WML Case Study
Providing a WAP/WML website for the mobile phone crowd?
I have an interest in WML and try to maintain a WML/WAP version of the Onaje.com website. The site at
http://www.onaje.com/wap/ is maintained by two scripts interacting with the database.
Data is pulled from several tables in the database:
A table that hold the articles.
A table defining categories for the articles.
A lookup table that cross references articles and categories by id.
Index.wml:
The homepage displays the site logo, the date and a link to another page.
// send wml headers
Once you have a WAP website up and running an interesting addition to the website would be allowing your users to send email via the website. Using PHP it is an easy matter to set up a WML form very similar to an HTML mailto form, a 'tell a friend about this website' or an 'email this article to a friend' type email script.
Experiments creating WML decks using PHP
Generating a calendar
This was viewed with the UP SDK 4.0, so the formatting fits the viewable screen with the default emulator skin. This is an adaptation of a PHP calendar class to make it work in a WAP browser. The next and previous month links generate the appropriate page by calling the script again and passing it the month and year variables in the href link. Once the script has the month and year it generates a date table for the month. The default value for month and year is determined through PHP's date() function.
Using PHP to create a WML page
If you have decided to have a WAP version of your website and you want to make it dynamic, you can use PHP to generate your WML pages. In order to view WML pages you should download and install a phone emulator from Phone.com, Nokia.com or somewhere else. You can also use a WAP enable cell phone.