RE: REPOST: Serving WML

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sorry, I didn't completely follow this thread (deleted the messages before I really read them).

But I've served WAP/WML before.  Made a couple of basic WML scripts and was able to  access them via my cell phone.

I posted them on a regular web server, nothing fancy.  All I had to do is make sure the headers being output were correct.   There are a ton of cell phone emulator programs for the PC to test to see if your script is working properly (saving you from having to do all your testing on your cell phone).  OpenWave makes a browser for many many cell phones and I believe they have an emulator.  There are a couple other big ones, some that will emulate different types of cell phones.  Forget the name now, but Google will tell you.

First I used this script as my index.php (default file that's served out):
############################### index.php
<?php
$redirect = "http://www.gryffyndevelopment.com/index2wap.php";; // ABSOLUTE URL to your WML file

header("302 Moved Temporarily");   // Force the browser to load the WML file instead
header("Location: ".$redirect);
?>
###############################

Here's the script that it was redirected to:

############################### index2wap.php
<?php
  header("Content-type: text/vnd.wap.wml");                       // set the correct MIME type
  header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");               // expires in the past
  header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");  // Last modified, right now
  header("Cache-Control: no-cache, must-revalidate");             // Prevent caching, HTTP/1.1
  header("Pragma: no-cache");                                     // Prevent caching, HTTP/1.0

  echo ("<?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="main" title="EgotripMain">

  <p align="center">
  <img src="egotrip.wbmp" alt="Egotrip Logo"/><br/>
testing
  </p>

</card>

<card id="main2" title="BootsMain">

  <p align="center">
  <img src="egotrip.wbmp" alt="Egotrip Logo"/><br/>
testing2
  </p>

</card>

</wml>
###############################


I don't think it's any different for GRPS (I'm on SprintPCS so it's..err.. CDMA I believe for the network protocol).  As long as the header is correct and the script is correct (WML is VERY strict unlike HTML) then you shouldn't have a problem.

If you want to do graphics, look for a WBMP converter.

If you have a newer phone, you might be able to do regular HTML or something else.   My stuff was all made to use old green background/black LCD text type cell phone.  Havn't played with it in ages, but thought I'd post what I had as an example.  Everything else can be done with a PHP backend to snag your email via POP3 or whatever you're trying to do.   Everything after that is WML and not really pertenant (sp?) to this mailing list.

Good luck!

-TG




= = = Original message = = =

> you own a phone company? get one of your lakey sysadmins to fix up what
> you need ;-)

LOL!  The trouble with lackey sysadmins is that they never do what they are
told, always what's "kewl" - I have long since lost the energy required to
beat them into submission!

> just like with a std net connection you need to actually _have_ a
> connection, and in your case you need to be able to reach the machine in
> question (i.e. not connect thru a gateway that only give you access to
> servers run by your connection provider).
> 
> a 5 second google gave me this page: http://www.filesaveas.com/gprs.html
> maybe that helps you on your way?
>
> whatever you do you need to cough up money for a GPRS connection :-)
> 

All I want to do is to be able to allow access to my email from my phone, to
start off with and then move slowly from there.

Mikey

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



___________________________________________________________
Sent by ePrompter, the premier email notification software.
Free download at http://www.ePrompter.com.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux