Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Feb 2006
    Posts
    44
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Browser Connections

    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

  • #2
    Senior Coder whizard's Avatar
    Join Date
    Jan 2005
    Location
    Philadelphia, PA, USA
    Posts
    1,662
    Thanks
    14
    Thanked 76 Times in 76 Posts
    PHP Tip: If you want to use short tags (<? or <?=$var) then make sure short_open_tag is set to "1". It really helps.

    Don't forget to save everyone time and mark your thread as Resolved :)

    "Also note that it is your responsibility to die() if necessary."

    DON'T USE THE MYSQL_ EXTENSION

  • #3
    New Coder
    Join Date
    Feb 2006
    Posts
    44
    Thanks
    0
    Thanked 0 Times in 0 Posts
    PHP Code:
    $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?
    Last edited by marf; 05-09-2007 at 07:02 PM.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •