You Are Here:

Community: Developer Discussion Boards

#1 Old php functions in wml cards - 1970-01-01, 02:00

Join Date: Mar 2003
Posts: 6
gwalkiden
Offline
Registered User
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
Reply With Quote

#2 Old RE: php functions in wml cards - 1970-01-01, 02:00

Join Date: Mar 2003
Posts: 3
w33els
Offline
Registered User
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
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia