...

View Full Version : Browser Connections



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

i have in the root of my website

index.php

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?

Thanks

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

HTH
Dan

marf
05-09-2007, 06: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?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum