Board index   FAQ   Search  
Register  Login
Board index PHP PHP General

PHP and wap

General discussions related to php

Moderators: macek, egami, gesf

PHP and wap

Postby Ihoss » Thu Sep 18, 2003 11:40 am

is there a special php that works on wap? i tried with the normal one, and for some strange reason the server didnt procces the php bits. it should proccess even if the file is a .wml file, shouldnt it?
Ihoss
New php-forum User
New php-forum User
 
Posts: 17
Joined: Sun Mar 30, 2003 11:41 pm

Postby Ihoss » Thu Sep 18, 2003 11:44 am

ok, i know:
Always use google before asking stupid questions. Always use google before asking stupid questions. Always use google before asking stupid questions. Always use google before asking stupid questions. Always use google before asking stupid questions. Always use google before asking stupid questions. Always use google before asking stupid questions. Always use google before asking stupid questions. Always use google before asking stupid questions. Always use google before asking stupid questions. Always use google before asking stupid questions. Always use google before asking stupid questions. Always use google before asking stupid questions. Always use google before asking stupid questions. Always use google before asking stupid questions. Always use google before asking stupid questions. Always use google before asking stupid questions. Always use google before asking stupid questions. Always use google before asking stupid questions. Always use google before asking stupid questions.
20 times, thats enough isnt it?
Ihoss
New php-forum User
New php-forum User
 
Posts: 17
Joined: Sun Mar 30, 2003 11:41 pm

:o) Pejone he fears you!

Postby ruturajv » Thu Sep 18, 2003 8:28 pm

:lol: :lol: :lol:

Pejone he fears you!!!! :lol:
User avatar
ruturajv
php-forum Super User
php-forum Super User
 
Posts: 1280
Joined: Sat Mar 22, 2003 9:42 am
Location: Mumbai, India

Postby Ihoss » Fri Sep 19, 2003 4:28 am

well it wasnt that easy after all. i still cant get my wap phone to read wap pages with php. it just says "bad gateway" (or something like that) which i have learnt means "error on page" (as i get that when i have an error on the page). is there something i have to do to make php wap workable. and does anyone have any good tutorials on php and wap?
Ihoss
New php-forum User
New php-forum User
 
Posts: 17
Joined: Sun Mar 30, 2003 11:41 pm

Re: :o) Pejone he fears you!

Postby Oleg Butuzov » Fri Sep 19, 2003 6:06 am

ruturajv wrote::lol: :lol: :lol:

Pejone he fears you!!!! :lol:



me ? might be WiZARD =)

1) You want to process wml files in php?
http://www.google.com/search?q=htaccess ... &hl=ru&lr=
you need to add wml to procces like php file

2) You want generate a wml files?
ask this man about WAP Class, that he have... tony2001 (at) phpclub.net

3) wrong header?
wml must get xml header as i know.


at next time please describe a problem =)
Oleg Butuzov
Last Samuray
Last Samuray
 
Posts: 831
Joined: Sun Jun 02, 2002 3:09 am

Postby Ihoss » Fri Sep 19, 2003 12:15 pm

the problem is that when i use wap pages with php that i find on the internet, my phone jsut sais: No gateway reply. i think this means that theres an error in the script, coz i got that before and when i fixed the script it worked

the script that i used is below:
Code: Select all
enter.wml

<?php
header("Content-type: text/vnd.wap.wml");
echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>";
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\""
. " \"http://www.wapforum.org/DTD/wml_1.1.xml\">";
?>
<wml>
<card id="main" title="Log ind">
<p>
Username:
<br />
<input title="user" name="username" />
Password:
<br /><input title="pass" name="password" type="password" />
<anchor>
Login
<go href="check.wml" method="post">
<postfield name="username" value="$(username)"/>
<postfield name="password" value="$(password)"/>
</go>
</anchor>
</p>
</card>
</wml>


check.wml

<?php
header("Content-type: text/vnd.wap.wml");
echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>";
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\""
. " \"http://www.wapforum.org/DTD/wml_1.1.xml\">";
?>
<wml>
<card id="varcheck" title="VARS">
<p>
<?php
if(isset($_POST["username"])) {
echo $_POST["username"];
}
echo"<br/>";

if(isset($_POST["password"])) {
echo $_POST["password"];
}
?>
</p>
</card>
</wml>
Ihoss
New php-forum User
New php-forum User
 
Posts: 17
Joined: Sun Mar 30, 2003 11:41 pm

Postby Ihoss » Fri Sep 19, 2003 12:21 pm

amazing! that .htaccess thing worked. now i only get :
Code: Select all
document start expected (before or at line 4)
Ihoss
New php-forum User
New php-forum User
 
Posts: 17
Joined: Sun Mar 30, 2003 11:41 pm

Postby Ihoss » Fri Sep 19, 2003 12:23 pm

changed from:
Code: Select all
<?php
header("Content-type: text/vnd.wap.wml");
echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>";
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\""
. " \"http://www.wapforum.org/DTD/wml_1.1.xml\">";
?>

to

<?php
header("Content-type: text/vnd.wap.wml");
echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>";
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"" . " \"http://www.wapforum.org/DTD/wml_1.1.xml\">";
?>

now i get file format unknown
Ihoss
New php-forum User
New php-forum User
 
Posts: 17
Joined: Sun Mar 30, 2003 11:41 pm

Postby WiZARD » Fri Sep 26, 2003 4:40 am

try read manual about WAP format at W3C
User avatar
WiZARD
Moderator
Moderator
 
Posts: 1257
Joined: Thu Jun 20, 2002 10:14 pm
Location: Ukraine, Crimea, Simferopol


Return to PHP General

Who is online

Users browsing this forum: No registered users and 4 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron