tags:

views:

26

answers:

1

Can wap pages be served on a regular web server? I have made a page with .wml extension and changed the mime type to php as i want to execute php on the page. The page looks fine on the handset but it will not display fields. Loading the page locally via a simulator has no problem. Here is the page, pretty simple stuff...

<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml"&gt;

<wml>
<card id="card1" title="Currency" newcontext="true">
<p>
Amount: <input format="N*M" name="amount" title="Amount:"/>
From: <select name="from" value="USD" title="From:">
<option value="DEM">German Mark</option>
<option value="FRF">French Franc</option>
<option value="FIM">Finnish Markka</option>
<option value="USD">US Dollar</option>
</select>
To: <select name="to" value="FIM" title="To:">
<option value="DEM">German Mark</option>
<option value="FRF">French Franc</option>
<option value="FIM">Finnish Markka</option>
<option value="USD">US Dollar</option>
</select>
<br/> = <u>$(conversion)</u>
<do type="accept" label="Calculate">
<go href="currency.wmls#convert('conversion','$(from)','$(to)',$(amount))"/>
</do>
<do type="help" label="Help">
<go href="#card1_help"/>
</do>
</p>
</card>
<card id="card1_help" title="Help">
<onevent type="onenterforward">
<go href="currency.wmls#getInfoDate('date')"/>
</onevent>
<p>
The currency rates were obtained from the Federal
Reserve Bank of New York on $(date).
<do type="prev" label="Back">
<prev/>
</do>
</p>
</card>
</wml>
A: 

Ok, cracked it, spoofed the mime type

header('Content-type: text/vnd.wap.wml');