0

I'm having problems using a wml script in my wml site, when I try to call a function the browser download the wmls file.

My server has all the mime types for wml

this is an example of my wml code embedded in php file

  <?header("Content-type: text/vnd.wap.wml");?>
  <?echo('<?xml version="1.0" encoding="UTF-8"?>');?>
  <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.2//EN" "http://www.wapforum.org/DTD/wml12.dtd">
  <wml>
    <card>
      <p>
        <b>WmlScript</b><br/>
        <a href="wmlscriptfile.wmls#helloWorld()">Run WMLScript</a><br/>
        $(message) 
      </p>
    </card>
  </wml>

this is the wmlscript code in wmls file

extern function helloWorld()
{
  WMLBrowser.setVar("message", "Hello World. Welcome to our WMLScript tutorial.");
  WMLBrowser.refresh();
}

I'm trying to insert the wmlscript in a php file changing the mime type in the header but the browser download the file again

<?header("Content-type: text/vnd.wap.wmlscript");?>
Clifford
  • 88,407
  • 13
  • 85
  • 165
  • 1
    Wow, nostalgia at its best. For a moment I thought it is 1998 again. Are there still applications out there in the wild, that use WML? – feeela Jul 11 '15 at 07:46
  • I have near twenty thousand clients using a wml application, this is because the customers don't want to use their smartphone – Eduardo Wallace Jul 13 '15 at 15:48

1 Answers1

0

The point is not about sending the proper MIME type, but having a client that knows how to handle that MIME type.

You need a client/browser that understands what WML is.

There is a Firefox AddOn for Fx 3.5 and 4 – I don't know if it still works with recent Fx versions.

Wikipedia knows that: “As of 2013, WAP use has largely disappeared in Europe and the United States.”

feeela
  • 29,399
  • 7
  • 59
  • 71
  • in fact I am testing with a wap browser. I have a few phones with wap browser, but this phones are trying to download the WMLS files (embedded in PHP, WML don't have problem to show the content) – Eduardo Wallace Jul 13 '15 at 15:58