<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
Ensuite on commence la page, une page minimum :
<wml>
<card>
Coucou le monde
</card>
</wml>
Le but du jeu est donc de faire afficher l'en-tête
par votre script php (ou autre
language), exemple ( Ce fichier php3 peut s'appeler comme-on-veut.php3)
:
<?php
header("Content-Type: text/vnd.wap.wml");
echo '<?xml version=\"1.0\"?>';
echo '<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML1.1//EN\" \"http://www.wapforum.org/DTD/wml_1.1.xml\">';
/*
Ci-dessus je fais afficher a mon script l'en-tête wml
Puis je démarre la page
*/
print ("<wml><card><p>");
/*
On peut include un script php dans la page, sans problèmes.
*/
include ("livre.txt");
print ("</p></card></wml>");
?>
Pour info ça va juste afficher le contenu
du fichier "livre.txt"
AddType application/x-httpd-php3 .wml .swml
AddType text/vnd.wap.wml .wml
AddType application/vnd.wap.wmlc .wmlc
AddType text/vnd.wap.wmlscript .wmls
AddType application/vnd.wap.wmlscriptc .wmlsc
AddType image/vnd.wap.wbmp .wbmp
AddHandler server-parsed .swml
DirectoryIndex index.wml
Si ca ne marche toujours pas renseignez vous ou prenez
un provider
potable :-))