FRIHOSTFORUMSSEARCHFAQTOSBLOGSCOMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Wap n PhP





janszmatt
Is it possible to create a wap site using PhP language??
I was thinking to create a wap-browser based game
hexkid
janszmatt wrote:
Is it possible to create a wap site using PhP language??


Not tested! WML copied from Wikipedia article on WML.

Code:
<?php
header('Content-type: text/vnd.wap.wml');
echo <<<WAP
wikipedia wrote:
Code:
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//PHONE.COM//DTD WML 1.1//EN"
   "http://www.phone.com/dtd/wml11.dtd" >
<wml>
  <card id="main" title="First Card">
    <p mode="wrap">This is a sample WML page.</p>
  </card>
</wml>
Code:
WAP;
?>
janszmatt
care to explain the code?

can frih hosted wap-php sites be accessable?
rohan2kool
nothing.. it's simple... the php code just outputs wml rather than the generally outputted html.
janszmatt
Code:
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//PHONE.COM//DTD WML 1.1//EN"
   "http://www.phone.com/dtd/wml11.dtd" >


wad about this code?
rohan2kool
janszmatt wrote:
Code:
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//PHONE.COM//DTD WML 1.1//EN"
   "http://www.phone.com/dtd/wml11.dtd" >


wad about this code?


it's the document type declaration for WML, as we do one for XHTML:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

It gives information about the xml file (in our case it tells, that the root element is 'wml', it is a public DTD and the location to the DTD file). The DTD file contains the rules (both syntatic and semantic) of how the xml file is written, what all tags are allowed, how the tags can be nested, which tags have which all attributes and so on.
Related topics
[php scripts ] phpweather&email
survey Insert in Php
HTTP AUTH with PHP and mySQL
PHP: Feedback form issues.. help =P
Mail with PHP (Simple Tutorial)
Anyone got a site???
¿qué opinan de esta noticia?¿alguno ha tenido uno?
Programming in a lot of languages
Waarmee maak jij je site?
ParadiseCatz
Fedora Core 5 pod i586, wogole istnieje?
Para Microsoft "ubuntu Es Perfecto"
Universal demanda a usuaria de youtube por usar una cancion
Ahlul Hadith and Salafi Brothers/Sisters on Frihost
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.