Title:
How to streamline your IDX content for HTML 4 compatible cellular telephones.
Author: Promethyl
Catagory: Beyond The Box
Date: Monday, July 21 2003
The first step in making your web presence mobile is designing your web presence with mobility in mind, of course.
The cell phone I have in mind is the Danger Hiptop Sidekick. It's mobile, can load large pages fast (uplink caching) and reads HTML 4.
When you design the webpage, have the slicer insert images into the table as TD Backgrounds. This will make them invisible to cellular telephones.
Essencially, you would determine if the requesting unit is a mobile telephone with WAP or HTML capabilities. It sends this information when requesting the page, read it, determine what needs to be sent, then send the appropriate content.
Although this can be done with Mod Rewrite, the more simple method is below for doing this. You would insert this code at the top of your page, before any other content.
The code in PHP for this looks like this:
if (stristr($_SERVER['HTTP_USER_AGENT'],'hiptop') OR stristr($_SERVER['HTTP_USER_AGENT'],'danger')) {
// Put Danger Mobile Content here.
die();
}
if (stristr($_SERVER['HTTP_ACCEPT'],'wap') or stristr($_SERVER['HTTP_ACCEPT'],'wml')) {
header("Content-type: text/vnd.wap.wml");
echo "<"."?xml version=\"1.0\"?".">"; // this is only added server side in this example to avoid php trying to parse the xml tag
?>
http://www.wapforum.org/DTD/wml_1.1.xml">
// Put WML phone content here
die();
?>
And the end result is this:
