×

Discussion Board

Results 1 to 3 of 3

Thread: WML and PHP

  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    1

    WML and PHP

    Hi,
    I have written a php-script, which is called by mobile phones. It tries to recognize the mobile using UserAgent.
    In case this is not working, I send a wml-string with mobile names in link form as following:
    <?xml version="1.0"?>
    <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
    <wml>
    <card id="Main" title="title">
    <p align="center">
    Please select a name:<br/>
    <anchor title="lnk1">Siemens M50
    <go href="URI"/>
    </anchor><br/>
    <anchor title="lnk2">Siemens SL45i
    <go href="http://URI"/>
    </anchor><br/>
    </p>
    </card>
    </wml>

    Now my problem:
    if I paste this text in a new script.wml and call it from through a mobile, everything's works.
    But if this script (string) is generated from my php-script and send to the mobile, it only works on few mobiles. Never on a Nokia.
    Does anybody know what's wrong?

    I also tried with header-setting before sending (doesnt work):
    header("Content-Type: text/html; text/vnd.wap.wml"
    echo $wml_string;

    Thanx
    Jem

  2. #2
    Registered User
    Join Date
    Mar 2003
    Posts
    2

    RE: WML and PHP

    Hi,

    Jem, why don't use just <? echo $HTTP_USER_AGENT; ?>so that you don't have to rely on the user to enter their phone details?

    M

  3. #3
    Registered User
    Join Date
    Mar 2003
    Posts
    2

    RE: WML and PHP

    Hi again. I think I misunderstood your question. How is the script generated from your php script? Does your php script not sit within the wml page? It may be easier if you show your php code and how it relates to the wml.

    M

Posting Permissions

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