![]() |
|
||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
MIVA® RESOURCES: Miva and WAP / WML
What is WAP and what is WML?WAP is Wireless Application Protocol and WML is Wireless Mark-up Language - HTML-like language for writing applications for WAP/WML enabled mobile phones and devices. Find more details in the links below or in any search engine. Exporting WML pages with MivaWML offers slightly better possibilities to write interactive pages than HTML. In some cases, it may be sufficient to create the content in Miva and export the results with MvEXPORT to a WML page. If you want to serve WML pages to WAP enabled devices, you should define a new handler and type in your Apache configuration (httpd.conf or .htaccess) as follows:
AddType text/vnd.wap.wml wml
I use this method for example for displaying current exchange rates on a WML page. A Miva script grabs hourly the rate information from several official sites, stores it into a database and exports it properly formatted into a WML page. You can find a link to the WML page at http://truxoft.com/rates/ (Note: it is an old and simple WML page that I built in 1998 just to test the new technology). Serving WAP/WML pages with a Miva engineCurrent Miva versions (up to 3.72 to this date) do not allow modifying the HTTP header and therefore a direct serving of WAP/WML pages by the Miva engine is normally not possible. However, you can patch the Miva binary to force it serving other then default HTTP headers. Such change is permanent, it means that a patched Miva binary serves always just a single MIME type. You will need to keep the original binary (miva) and create a patched copy (e.g. miva-wml or miwa) for serving WAP/WML applications. You also need to add a new MIME type to your Apache configuration file (httpd.conf or .htaccess):
Action application/x-httpd-Miwa /cgi-bin/miwa
In this way you can write WML pages with all advantages of the interactivity of the Miva script together with WML tags. Miva engine patchBefore patching the Miva engine you should read the usual disclaimer and be aware that I publish the information for educational use only. If you make the patch, do it on your own risk and in your responsability. You will need to copy the Miva binary and open it in a hex editor. Search for the string 'text/html'. There are more instances, but just the one in the following context is important: ... %u %ld %lu %f text/html Cannot open configuration ...
You have to replace the
The following error message ' Some Useful LinksPhone.com Developer Web SiteNokia WAP Toolkit Ericsson Developers' Zone List of several hex-editors tiny (11kB) Hex editor (freeware) [cached] Hackman hex editor (freeware) HexWorkShop |
||||||||||
|
Miva and some other terms used on this page are registerd trademarks of the Miva Corporation |