WML Bigromu

This will help you build Learn WML,Learn WAP applications...Learn WML,Learn Wireless,Understand Markup Language Tutorial, Wireless Application Protocol Tutorial, Building WAP sites tutorial, Building Wireless Application Protocol Website tutorial, Web Site tutorial, Wap Site tutorial, Wap tutorial, WAP tutorial, Site Mobile tutorial, Mobile Site Tutorial, PDA SITE,

Wednesday, September 13, 2006

Inserting PHP into a WML document

Any WML document containing PHP must have the following lines of code (known as a prolog) placed at the very top of the deck:




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

This is necessary because PHP will, by default, send the line Content-type: text/html . By using PHP's header() function, however, it is possible to suppress this line, thereby sending the correct (wml) one, instead.

0 Comments:

Post a Comment

<< Home