Skip to main content

Posts

Showing posts from February, 2009

Generating XHTML MP (WAP 2.0) Pages From PHP

Maybe you guys know that I've been working on a service called MyWapBlog.com which lets peoples create/manage mobile blogs using their mobile phones. In the course of the development I've learnt great deal about mobile websites and their dynamic generation, and I'm sharing a bit of it here in this post. How do you generate dynamic (X)HTML Pages using PHP? Simple: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"  dir="ltr"> <head> <title>Sometitle</title> </head> <body> <h1>Hello</h1> <p> <?php  echo  date ( 'h:i A, j-M-y' );  ?> </p> </body> </html> And if you look at XHTML MP pages, their source look like the following: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//WAPFORUM