Sami Posted December 23, 2010 Share Posted December 23, 2010 I scripted a file in 5 seconds and visited with my mobile phone(cheap Samsung)Here's the script: <?php header("content-type: text/plain"); echo($_SERVER["HTTP_ACCEPT"]); ?> The phone returned me a looooooooooooooooooooooooooooooong list of MIMEs separated by commas, but how can I find out if one of them are "text/vnd.wap.wm"? Link to comment Share on other sites More sharing options...
Fmdpa Posted December 23, 2010 Share Posted December 23, 2010 2 suggestions:If they are arranged alphabetically, it shouldn't be hard to find it by inspecting the pattern. If your phone has a page search, use that. Link to comment Share on other sites More sharing options...
Sami Posted December 23, 2010 Author Share Posted December 23, 2010 I'd like to find out using PHP so I can display a WAP page instead of HTML page Link to comment Share on other sites More sharing options...
thescientist Posted December 23, 2010 Share Posted December 23, 2010 I'd like to find out using PHP so I can display a WAP page instead of HTML pagewhat about using a string search function for the MIME type coupled with some conditional statements? Link to comment Share on other sites More sharing options...
Fmdpa Posted December 24, 2010 Share Posted December 24, 2010 $pos = strpos($_SERVER['HTTP_ACCEPT'], 'text/vnd.wap.wm');if ($pos === false) { //display html} else { //display wap} Link to comment Share on other sites More sharing options...
Sami Posted December 24, 2010 Author Share Posted December 24, 2010 thx Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.