Integrating PHP into WML

Hi all,

I’m not sure this is the right forum to ask anything about WML or WAP, but i hope someone know abit can help me here. My question is, i have this simple PHP code that will display result on WAP phone, but i’m not sure how to execute the file. I have the PHP server ready and WML phone simulator installed. Any idea? Many thanks :slight_smile:


<?php
 
header("Content-type: text/vnd.wap.wml");
print "<?xml version=\"1.0\"?>
";
print "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\""
. " \"http://www.wapforum.org/DTD/wml_1.1.xml\">
";
print "<wml>
";
print "<card>
";
print "<p>Hello world</p>
";
print "</card>
";
print "</wml>
";
 
?>

after 2 weeks of learning wml, i can answer my own question above easily. To execute the file, simply type the full address, such as http://localhost/test/test.wml, either on Firefox with wml plugins installed or Openwave Phone Simulator. But make sure that server is well configured for WML-PHP parsing. Looks like over 100 people view this page and none of them can answer my question, so for those who wanna learn more like me about this new programming language, http://forums.devshed.com/wap-programming-20, its the right place.