Posted By

kbrown on 06/24/11


Tagged

php iphone switchcontent


Versions (?)

php switch content for ipad/iphone/ipod


 / Published in: PHP
 

  1. <?php
  2. if(strstr($_SERVER['HTTP_USER_AGENT'],'iPhone') || strstr($_SERVER['HTTP_USER_AGENT'],'iPod') || strstr($_SERVER['HTTP_USER_AGENT'],'iPad')) {
  3. echo('<div id="homeAnimation">
  4. <a href="javascript:switchtoVideo()"><img src="/images/photo-home1.jpg" width="622" height="360" /></a>
  5. <a href="javascript:switchtoVideo()"><img src="/images/photo-home2.jpg" width="622" height="360" /></a>
  6. </div>');
  7. } else {
  8. echo('<div id="homeVideo">
  9. <script type="text/javascript">
  10. var FO = { movie:"swf/home.swf", width:"622", height:"360"};
  11. create(FO);
  12. </script>
  13. <noscript>
  14. <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="622" height="360">
  15. <param name="movie" value="swf/home.swf">
  16. <param name="quality" value="high">
  17. <embed src="swf/home.swf" width="622" height="360" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>
  18. </object>
  19. </noscript>
  20. </div>');
  21. }
  22. ?>

Report this snippet  

You need to login to post a comment.