Of course, there are other ways to search the Internet can be obtained. I recommend a way to browse both the HTTP page and the WAP page, which is to use the Firefox + wmlbrowser component. Install the Wmlbrowser component Firefox can support the direct browsing WAP page.
Because of the need for dynamic output, we have to set the suffix of the page as. PHP, so how do you let the browser parse it into a WAP page? Quite simply, just tell the browser the MIME type of the file when the header file is output.
Copy Code code as follows:
<?php
Header ("CONTENT-TYPE:TEXT/VND.WAP.WML");
?>
With the above sentence, the file extension is not important.
The next is to write a PHP file on the line, syntax ah function ah all as usual, remember to first output the XML format header,
Copy Code code as follows:
<?php
Echo (' <?xml version= "1.0"?> ');
?>
In addition, the format of the text should be written in WML format (also equivalent to XML), the WML specification is fairly strict, and a bit of error may result in the inability to output the required pages.
A WML template is as follows:
Copy Code code as follows:
<?xml version= "1.0" encoding= "gb2312"?>
<! DOCTYPE WML public "-//wapforum//dtd WML 1.3//en" "HTTP://WWW.WAPFORUM.ORG/DTD/WML13.DTD" >
<wml>
<card title= "" >
</card>
</wml>
Most of the current WAP phones (Nokia7110, Ericsson r320s, etc.) are encoded using the UTF-8 code, which is encoded using Unicode. In this way, if we use Chinese characters (GB2312 encoding) directly in WML, the code will be garbled and the cell phone user cannot recognize it, so we will use the program or function to encode the Chinese in Unicode before we export the language. In a few mobile phones or WAP terminals that support GB2312 encoding, we can correctly display Chinese characters directly after we have defined the code type of the document in the program.