**Under Construction!!
**new: (7/9/4) Added directions for setting up a personal WML homepage for
your cell phone.
mkdir mobile
cd mobile
.htaccess file.gcd
extension) to your
.htaccess file under mobile.
Add the following line to .htaccess:
AddType text/x-pcs-gcd gcd
echo "AddType text/x-pcs-gcd gcd" >>.htaccess
chmod ugo+r .htaccess
Now your server is ready for serving the content. It is also possible to
add the MIME type for gcd to the main Apache configuration
as described in Apache documentation, but .htaccess allows
for changing local settings. Plus, it works even if you do not have
the privileges to modify the Apache configuration.
gcd filegcd file, that describes the
nature, URL etc., of the media file you want to download, and then point
your phone browser to it. A typical gcd file looks like the following:
Content-Type: audio/midi
Content-Name: Loops
Content-Version: 1.0
Content-Vendor: ARB
Content-URL: http://yourWebSite/mobile/loops.mid
Content-Size: 50455
You can save this as music.gcd under
the directory mobile.
jpg, jpeg, png, wbmp, pmd, cmx, mid, midi, qcp, jar, jad
The gcd file enteries are as follows:
Content-Type
This entry specifies the MIME type of the content to be uploaded. Simply
change the line to the media type that you are trying to upload. The example
is for a midi file.
MIME types for some common media files are:
MID: audio/midi
JPG: image/jpeg
TXT: text/plain
QCP: audio/vnd.qcelp
JAD: text/vnd.sun.j2me.app-descriptor
JAR: application/java-archive
PNG: image/png
PMD: application/x-pmd
WBMP: image/vnd.wap.wbmp
Content-Name
This is the name that your media file will be given on the phone. Avoid special
characters in the name. I usually stick with alphanumerics and space.
Content-Version
This is the version of your media file, basically to keep track of various
versions of a file. I think I have always used 1.0.
Content-Vendor
The name of the owner or vendor of the media file. You can use your name here.
Content-URL
This should be the exact URL for the actual media file.
http://yourWebSite/mobile/loops.mid in the example. I have
observed that using underscores in media file name causes
"Data Error 905/ Attribute Mismatch". Avoid that.
Content-Size
This should be the exact size of the media file in bytes (e.g., from ls -al loops.mid)
Content-Type:[Single Space]audio/midi
.gcd extension. However, it helps to name it something similar
to the media file to quickly locate a gcd file associated with a particular
media file. e.g, the example file is named loops.gcd
We are now ready to upload content to the phone. You can either send yourself
a message with the URL of the gcd file, or open the URL in the browser.
For our example, the URL is http://yourWebSite/mobile/music.gcd.
In case you want to send yourself an email, you can also use the email address
your_phone_number@messaging.sprintpcs.com.
After testing the above method for uploading individual media contents, you can also setup a homepage for your cell phone. The following steps will help you setup a Homepage:
.htaccess file, this will ensure that your webserver recognizes
the MIME types and send appropriate information to the cell-phone browser.
DirectoryIndex index.wml
addtype text/vnd.wap.wml wml
addtype application/vnd.wap.wmlc wmlc
addtype text/vnd.wap.wmlscript wmls
addtype application/vnd.wap.wmlscriptc wmlsc
addtype image/vnd.wap.wbmp wbmp
Note that the first line here is not actually a MIME type, it
simply tells the webserver to send the index.wml if the URL
points to the directory instead of a specific file.
index.wml
under the directory mobile.
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card id="MainCard" title="ARB's Homepage">
<p align="center">
<!-- This is some intro text -->
Welcome to ARB's homepage.<br/>
<a href="http://yourWebSite/mobile/music.gcd">My fav midi</a>
</p>
</card>
</wml>
Note that depending on your current browser window size, the second line
may appear to have line breaks, but for the code to work correctly, it
should be typed in one line without any line breaks.
http://yourWebSite/mobile/),
or email the link to your cell-phone. The page will have the links for various
media files that you need.
Hopefully, these instructions are useful to you. If you have a question, or noticed a mistake on this page that should be corrected, you can email me at alirazabutt at acm dot org