I'm trying to create and test WAP pages on my pc. I've downloaded a wap emulator, that looks like a phone and you give it an url. I tried this with http://localhost/wap/dan.wml and I get an error saying invalid file (from the emulator).

My source looks like:

<?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="card1" title="Example 1">
<p>
<?php

// format and output date
$the_date = date("M d Y");
print $the_date;
print "<br/>Welcome to a PHP-enabled site!";

?>
</p>
</card>
</wml>

Any iedas? I thought it may have something to do the with <!DOCTYPE bit, as that has an url in it (and I'm not connected to the net, it's all offline). Is this it? And can I rig it to work on my local pc?

Thanks,

Danny

    I tried copying that file to my pc and changing the path. No luck. I think it may be the emulator.

    Anyone know of any good WAP emulators (that aren't about 9mb like I found! this one was about 700kb).

    Thanks

      There are no good emulators from my expereince. I used the nokia one which wasn't bad and then there is a descent one at http://www.applepiesolutions.com/swap/index.html

      Your best bet is going to be to get a WAP enabled phone and actually do the testing on that. There is a higher cost of programming that goes with it due to the minutes adding up quickly but it will provide to you with better results. I found that often I would have everything working in an emulator, then go to the phone and it wouldn't work, so, it was easier just to test directly on the phone.

        I got WinWap which is quite good.

        I'm not shelling out for a wap phone just for the sake of a few quids worth of scripts, so I'll just have to live with it. They guy I'm doin it for has a 7110 (Uh! 3310 rules! but I want an 8310!), so I'll get him to test it every now and then.

          Write a Reply...