×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    6

    php functions in wml cards

    I am trying to get my 6210 simulator for the nokia toolkit to interpret php, but note that on almost every page I read here on in the internet, whatever forum, I see varying header code to generate a wml file. I have several files that respond to php and generate wml that is correctly displayed by Opera (it has native wml), but although i have a couple of files that generate readable wml on the simulator, all the php code seems to be ignored. Is there no definitive correct way of coding for this purpose, or are the simulators just not up to it? I would be most grateful for any tips.

    Geoffrey Walkiden

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

    RE: php functions in wml cards

    Your wml output device (simulator or real phone, or even Opera) will only display the wml text that is sent to it. So your php code must 'echo' the relevant wml deck info and prior to sending must send the appropriate http header to tell the wap gateway that it is wml content. For php the command would be
    header("content-type: text/vnd.wap.wml; charset=iso-8859-1"

    Then you can send the deck content...

    echo <<<HEADER
    <?xml version="1.0"?>
    <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">

    <wml>
    etc...
    </wml>
    HEADER;


    Notes:

    I cannot get the 6210 simulator to work with the ToolKit and so use the default "Nokia Internet Browser" for all my development.

    Watch out for deck size limits on the 6210, I think it has a small memory that will not display a large deck.

    Don't rely on Opera as your test device because it doesn't support all the wml functionality, in particular the 'postfield' tags do not work.

    Regards,
    Roger

Posting Permissions

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