View Full Version : Browser Connections

05-08-2007, 05:33 PM
I'm not sure where to put this. But heres the basic rundown

i have in the root of my website


and an index.wml

and it by default loads index.php

however when I go to the website ex.. http://www.mysite.com/
if i browse to that on a wap browser, or mobile device
it says teh webpage cannot be displayed.

How does it detect if the user is browsing from a mobile (WAP) browser, and needs WML, or what if the user is browsing from a newer device which supports html, then can they go to the regular index.php?


05-08-2007, 07:45 PM
Try this thread: http://www.codingforums.com/showthread.php?t=11645


05-09-2007, 07:29 PM
$usr_agent = strtolower($_SERVER['HTTP_USER_AGENT']);

if((strpos($usr_agent,"blackberry") === true){
//They need wml for these WAP devices

} else{
//Its a pc

That is a simplified version of what I'm trying to do. So when I go to my website, it works, and ofcourse goes to the PC part. But when I go to the page on my blackberry it gives error 200 doesn't recognize the http, whatever crap. Can the WAP browser not interpret index.php? I've tried this crap on index.wml and I have enabled php to be parsed in WML on the IIS server management options. Ideas?