ADAM is About Advanced Design and Manufacturing with Information Technology, and Cyberspace Product and Service Reviews in our Virtual Exhibition Hall, Including the Latest News, the Most Innovative International Products & Services, New Strategies, R&D, and more...

We provide quality data and information, that could be turned into knowledge and used for decisions...
 

Fundamentals of Dynamic Wireless Content Serving

by

Mick L. Ranky

Internet and Applied Mathematics Review Editor, ADAM with IT

Website: http://www.cimwareukandusa.com

Email: cimware@cimwareukandusa.com

Introduction

The purpose of Dynamic Wireless Content Serving is to access vital information on demand, just-in-time. In this article we explain the configuration process of wireless content serving over the Internet, using mobile devices, such as cell phones, palmtop computers, and others.

Configuration Process

Let us explain the fundamentals of how to set up and start serving wireless content (WAP) on the Mac OS X Server (version 10.2), using Apache and PHP. By following this article you'll be able to master the basics, and you'll be up and running without any difficulties.

The Wireless Application Protocol (WAP) is a set of open, global protocols for developing applications and services, that use wireless networks. WAP protocols are mainly based on already existing Internet protocols, and in addition to that, they are optimized for mobile users accessing wireless devices.

The Wireless Markup Language (WML) is the language designed to create WAP contents. It is similar to XML, and it is based on XML's syntax and strictness. (Many tags and attributes are the same, but there are fewer tags however). Anybody who has used HTML will be able to master WML.

Let us guide you through the process how to set up and start serving wireless content (WAP) on the Mac OS X Server, with the aid of a few screen-segment prints, as illustrated below:

Step 1: Set up Apache. To be able to serve wireless content, you need to make a few changes in Apache to make it to work. You should have the Server Admin. Tolls up and running to be able to execute the following steps.

Step 2: Open up the 'Server Settings' application, and click the 'Internet' tab.

Step 3: Click the 'Web' icon and select the 'Configure Web Service...' from the pop-up menu.


Step 4: Select the 'Mime Types' tab from the tab panel. You should see something similar to this:

Step 5: Now click on the 'Add...' button and add the following text as the sample image shows below:

Document type MIME type Extension
Plain WML documents text/vnd.wap.wml .wml
Wireless Bitmap Images image/vnd.wap.wbmp .wbmp
Compiled WML documents application/vnd.wap.wmlc .wmlc
WMLScripts text/vnd.wap.wmlscript .wmls
Compiled WML Scripts application/vnd.wap.wmlscriptc .wmlsc



To finish the setup, restart the web server.

You are now ready to serve WAP content from your server.

The Basics of Serving Dynamic Wireless Content

WAP is mainly only usefull when the content updates should happen on a short and timely basis. For that, dynamic serving (such as with PHP, ASP, JSP, etc...) is the best solution, rather than updating everything manually.

Let us offer a template for programming wireless content in WML and PHP. (You can type in the following code, or copy-paste it, into your favourite text editor).

We strongly encourage everyone to use Barebone's BBEdit, but TextEdit will also work. The important issue here about using TextEdit here is, that you have to switch TextEdit to plain text mode, otherwise our example will not work at all:

<? php 
// send wml headers
header ("Content-type: text/vnd.wap.wml" ); 
echo "<?xml version=\"1.0\"?>" ; 
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"" 
    .  " \"http://www.wapforum.org/DTD/wml_1.1.xml\">" ;
?>

<wml>
<card id="card" title="Dynamic Content">
  <p>
     <?php 
        echo "<br/>The curent date is: " ;
        $the_date  =  date ("M d Y" );
        echo $the_date ;
     ?>
  </p>
</card>
</wml>

Save the file and name it 'index.wml'. Upload it to your server with your favourite method and then call the file from your mobile phone or visit http://www.mobone.com/ where you can find a free WAP browser emulator.