php page, browse over thru GPRS using mobile phone...
Moderator: General Moderators
php page, browse over thru GPRS using mobile phone...
Hello
i am trying to feed a dynamic wap/wml page using PHP on a mobile phone's wap/wml browser..
i kept on getting errors.. any idea why? must be my host's web server or something?
for instance, i place this url on my nokia 7650: http://www.angrysoft.com/test.php
but i just get error.. many thanks.
i am trying to feed a dynamic wap/wml page using PHP on a mobile phone's wap/wml browser..
i kept on getting errors.. any idea why? must be my host's web server or something?
for instance, i place this url on my nokia 7650: http://www.angrysoft.com/test.php
but i just get error.. many thanks.
- AVATAr
- Forum Regular
- Posts: 524
- Joined: Tue Jul 16, 2002 4:19 pm
- Location: Uruguay -- Montevideo
- Contact:
what error?
thisone:
show us your code
thisone:
Code: Select all
Parse error: parse error, unexpected T_STRING in /home/mickey/public_html/test.php on line 1In addtion, are you throwing the correct mime type for your WML?
Regards,
Code: Select all
header( "Content-type: text/vnd.wap.wml");hello!!!
thanks for the quick reply, yep, that's the error.. and no mime type hmm...
anyway this is my entire php page that generates the wml page:
anyway, i'll try placing the mime type now,
thanks for the quick reply, yep, that's the error.. and no mime type hmm...
anyway this is my entire php page that generates the wml page:
Code: Select all
<?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="HTML" title="HTML Tutorial">
<?php
print("<p>Our HTML Tutorial is an award winning tutorial from W3Schools.</p>");
?>
</card>
<card id="XML" title="XML Tutorial">
<p>
Our XML Tutorial is an award winning
tutorial from W3Schools.
</p>
</card>
</wml>Just another adition, you will need to echo out your XML declaration if you have short tags <? ?> enabled:
Regards,
Code: Select all
echo '<?xml version="1.0"?>';
Last edited by cactus on Sun Jun 22, 2003 11:12 am, edited 1 time in total.
hmm.., i don't know, my nokia 7650 is not displaying the wml page...
here is the entire php page now:
thanks.
here is the entire php page now:
Code: Select all
<?php
print("<?xml version="1.0"?>");
?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">
<meta http-equiv="Content-Type" content="text/vnd.wap.wml;">
<wml>
<card id="HTML" title="HTML Tutorial">
<?php
print("<p>Our HTML Tutorial is an award winning tutorial from W3Schools.</p>");
?>
</card>
<card id="XML" title="XML Tutorial">
<p>
Our XML Tutorial is an award winning
tutorial from W3Schools.
</p>
</card>
</wml>2 things, I would remove the meta tag and throw the mime type via PHP, secondly, in the code you posted, you haven't shown your XML declaration at the top of the page.
Also
Try using a single "card" as a test first:
Also
Code: Select all
<?php
header( "Content-type: text/vnd.wap.wml");
echo '<?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="HTML" title="HTML Tutorial">
<?php
echo "<p>Our HTML Tutorial is an award winning tutorial from W3Schools.</p>";
?>
</card>
</wml>