Thread: PHP grief
View Single Post
  #7 (permalink)  
Old 11-03-08, 08:33 PM
End User's Avatar
End User End User is offline
Level II Curmudgeon
 
Join Date: Dec 2004
Posts: 3,027
Thanks: 14
Thanked 35 Times in 33 Posts
I think there are some simple ways to detect if you've got a mobile user...once that's done your code can make whatever changes are appropriate. I haven't tested this code but you can give it a whirl:

PHP Code:

<?php

if ( strpos($_SERVER['HTTP_ACCEPT'],'application/vnd.wap.xhtml+xml')!==false ){

  
// It's a mobile device, do something appropriate

}else{

// do whatever you normally do for a regular browser

}

?>
__________________
I don't live on the edge, but sometimes I go there to visit.
-------------------------------------------------------------------------
Sanitize Your Data | Oracle Date & Substring Functions | Code Snippet Library | [url=http://www.codmb.com/Call Of Duty[/url]
Reply With Quote