×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Mar 2004
    Posts
    4

    PHP and WML, strange error

    I get "No response, try again" at my Nokia 7210, but the site works fine in WAP-emulators. The adress is: http://arex.no-ip.biz:9000/wap/
    Here is the PHP + WML:

    <?php

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

    header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");

    header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");

    header("Cache-Control: no-cache, must-revalidate");

    header("Pragma: no-cache");

    print "<?xml version=\"1.0\"?>\n";

    print "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\""

    . " \"http://www.wapforum.org/DTD/wml_1.1.xml\">\n";

    ?>

    <wml>

    <card id="applications" title="applications">

    <p align='center'> Applications </p>

    <p align='center'> <?php echo date("d.m.y, H:i:s",time()); ?> </p>

    <p>
    <select name="Letter" title="Letter">
    <option value="a">a</option>
    <option value="b">b</option>
    <option value="c">c</option>
    <option value="d">d</option>
    <option value="e">e</option>
    <option value="f">f</option>
    <option value="g">g</option>
    <option value="h">h</option>
    <option value="i">i</option>
    <option value="j">j</option>
    <option value="k">k</option>
    <option value="l">l</option>
    <option value="m">m</option>
    <option value="n">n</option>
    <option value="o">o</option>
    <option value="p">p</option>
    <option value="q">q</option>
    <option value="r">r</option>
    <option value="s">s</option>
    <option value="t">t</option>
    <option value="u">u</option>
    <option value="v">v</option>
    <option value="w">w</option>
    <option value="x">x</option>
    <option value="y">y</option>
    <option value="z">z</option>
    </select>
    </p>
    <do type="accept" label="Show">
    <go href="Applications.php" method="GET">
    <postfield name="Letter" value="$(Letter)"/>
    </go>
    </do>

    <?php

    if ($_GET['Letter']) {

    $dir = "C:\Apache Group\Apache2\htdocs\wap\warez\Applications\\";

    if ($dh = opendir($dir)) {
    while (($file = readdir($dh)) !== false) {
    if (filetype($dir . $file) == file) {
    if (strtolower($file{0}) == "$_GET[Letter]") {
    if ( strtolower($file{strlen($file)-1}) == r) {
    $files[] = $file;
    }
    }
    }
    }
    closedir($dh);
    }


    if (is_array($files)) {
    foreach ($files as $key => $value) {
    echo "<p align=\"center\"> <a href=\"warez/Applications/";
    echo "$value\">$value</a> </p>";
    }
    }

    else {
    echo "No results.";
    }

    }

    ?>

    </card>
    </wml>






    Here is an example of some output:

    <wml>
    <card id="applications" title="applications">
    <p align="center">
    Applications
    </p>
    <p align="center">
    06.03.04, 14:27:37
    </p>
    <p>
    <select title="Letter" name="Letter">
    <option value="a">
    a
    </option>
    <option value="b">
    b
    </option>
    <option value="c">
    c
    </option>
    <option value="d">
    d
    </option>
    <option value="e">
    e
    </option>
    <option value="f">
    f
    </option>
    <option value="g">
    g
    </option>
    <option value="h">
    h
    </option>
    <option value="i">
    i
    </option>
    <option value="j">
    j
    </option>
    <option value="k">
    k
    </option>
    <option value="l">
    l
    </option>
    <option value="m">
    m
    </option>
    <option value="n">
    n
    </option>
    <option value="o">
    o
    </option>
    <option value="p">
    p
    </option>
    <option value="q">
    q
    </option>
    <option value="r">
    r
    </option>
    <option value="s">
    s
    </option>
    <option value="t">
    t
    </option>
    <option value="u">
    u
    </option>
    <option value="v">
    v
    </option>
    <option value="w">
    w
    </option>
    <option value="x">
    x
    </option>
    <option value="y">
    y
    </option>
    <option value="z">
    z
    </option>
    </select>
    </p>
    <do label="Show" type="accept">
    <go href="Applications.php">
    <postfield name="Letter" value="$(Letter)"/>
    </go>
    </do>
    <p align="center">
    <a href="warez/Applications/Abbrev.jar">
    Abbrev.jar
    </a>
    </p>
    <p align="center">
    <a href="warez/Applications/AlarmClock.jar">
    AlarmClock.jar
    </a>
    </p>
    </card>
    </wml>

  2. #2
    Registered User
    Join Date
    Mar 2004
    Posts
    4

    addition

    I should probably also inform you about this; It works at some cell phones. (not at my 7210, where it actually should work!)

  3. #3
    Registered User
    Join Date
    Jan 2004
    Location
    Beverly Hills
    Posts
    19

    I tried it out

    It looks good, except you are using single-quotes around all the attributes. I've never seen that in WML documents. Maybe it is allowed, but maybe it is causing the problems. Could you try it with standard double-quotes?

    ---------
    Create a WAP server automatically

  4. #4
    Registered User
    Join Date
    Mar 2004
    Posts
    4
    I've tried. Did not help
    The address is: http://arex.no-ip.biz:9000/wap/

  5. #5
    Registered User
    Join Date
    Jan 2004
    Location
    Beverly Hills
    Posts
    19

    I looked at it from my emulator

    and it worked fine. I can only guess that maybe your carrier is blocking your phone from accessing non-standard ports? What I would do at this point is create a braindead-simple WML page that just says "hello" and that you know is correct, with no PHP, and test it in the emulator and then see if you can get it on the phone.

    ---------------
    Turn your Web server into a WAP server

  6. #6
    Registered User
    Join Date
    Mar 2004
    Posts
    4
    I'm really sorry I forgot to tell you this, but the front page works. Its the links to "Applications", "Games" etc that does not work. When i try to access those, I get "No respose" etc.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×