i'm trying to build a simple experimental WAP site. Well, I want it to display dynamic content, for instance, news and updates.
I am using WML to build the page and PHP to get the dynamic content from database.
The first page contains no PHP script, so I named it index.wml.
in this page, I have 3 menus, one of em is "Contact Us" (contact.php) which should display a form for user to fill in.

When I access the WAPsite using my handphone (N3650, N3100, and SonyEricsson T610), I can view the homepage (index.wml), but I always get "File Format unknown" or "Unsupported content-type" for contact.php!

I have added these lines:

<?php 
    header("Content-type:text/vnd.wap.wml"); 
    print "<?xml version=\"1.0\"?>\r\n"; 
?>

on top of contact.php, but no cure. 😕 What do you think might be the problem? Thanks in advance for any reply.

    it looks like the browser won't load non wml files

    i think what you'll need to do is use htaccess to configure apache to parse wml files as php, and then rename all your php files as wml

    this is a bit beyond me, and might not be possible. but if you like a challenge, start here

    adam

      a year later

      Message # 1013612:
      Date: 10/01/02 18:00
      By: Johnny Profile
      Subject: wml + php solution...

      Hi All!

      I found an interesting diference between my solution and this article.
      Almost everything is the same, but when i'm using the
      header (Content-Type: text/vnd.wap.wml); function, my phone says "Response unknown" or "No response, try again"
      I have Nokia 6510 mobile.
      So I don't use the header function and everything works well 🙂

      Here is my sample code what I use.

      <?php
      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="main" title="First Wap page">
      <p>Here is a php number:
      <?php $i=1; echo $1;
      <br/>
      </p>
      </card>
      </wml>

      Thats all.
      Bye.

      http://www.phpbuilder.com/annotate/message.php3?id=1013612

      I have Nokia6100 and i get the same error with some WML scripts.I can't imagine what the problem is.If anyone can help me(us) please post it here al their experience ( knowledge ) about this problem.

      WAP Chats :

      MobiiliChat 1.07

      http://www.mobiilichat.com/forum/mobiilichat_v1.07.zip

      W@Pchat Ver.1.2

      http://www.earthweb.biz/myscript.php?file=wapchat.zip

      GumSlone WAP Chat2 and 1.05

      http://gumslone.com/scripts/wap_chat_v2.zip
      [url]http://gumslone.com/scripts/GS_WAP_CHAT_V1.0.5.zip[/url]

      I have install it in my PC Apache + PHP + MySQL with WML support.All in one package : XAMPP for WINDOWS

      All 3 WML scripts works with WINWAP 3.2

      BUT IN MY NOKIA6100 just MobiiliChat works 100%.The rest 2 scripts didn't work ,and i get "File Format Unknow" ERROR.

      Look the 3 WML script header functions :

      MobiiliChat 1.07

      header("Content-type: text/vnd.wap.wml; charset=ISO-8859-1");

      W@Pchat Ver.1.2

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

      GumSlone WAP Chat2 and 1.05

      header("Content-type:text/vnd.wap.wml;charset=UTF-8");

      It might be possible to be this header problem? MobiiliChat 1.07 works 100% for me, bust rest 2 NOT WORK !

        well, I have dat problem and I still cant solve it till today.
        Finally, I found this language XHTML MP and stick with it.
        Works fine in major mobile phones! 🙂

        So, say bye to WML and all the error!!!

          Nokia6100 works with XHTML MP language?
          Where can i find more info about this ? What's the difference between WML and XHTML MP ?
          Where can i find XHTML MP scripts? ( Chat script especially )

          thank you very much

            Write a Reply...