ok here is an example of how ive managed to add wml and xhtml together
yes I am currently using this page atm lol but will be updating it alot now
<?php
/*
////////////////////////////////////////////////////////
// //
// www.mobilefonez.com //
// Downloads Script //
// By Andrew Haswell //
// andrew2005haswell@hotmail.com //
// Copyright 2007 //
///////////////////////////////////////////////////////
*/
//// You May Use This Code Anywhere You Feel Like if you Update It Please Let Me Know
//// to use this as a demo paste this link yoursite.com/about.php?code=wml or change the extension to xhtml
//// note::below is the ibwf core.php and config page links
//// just for your refrence !!
include("/wap/config.php");
include("/wap/core.php");
$code = $_GET["code"];// This is The Code That I will now use to display the wml function.
if($code=="wml"){
header("Content-type: text/vnd.wap.wml");
header("Cache-Control: no-store, no-cache, must-revalidate");
echo '<?xml version="1.0"?' . '>';
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"". " \"http://www.wapforum.org/DTD/wml_1.1.xml\">";
}else{
/////// if the browser isnt a wml browser they automatically get this page title instead of the previous
header("Content-type: text/html; charset=ISO-8859-1");
header("Cache-Control: no-cache, must-revalidate, max-age=0");
header("Pragma: no-cache");
echo '<?xml version="1.0"?' . '>';
echo "<!DOCTYPE html PUBLIC \"-//WAPFORUM//DTD XHTML Mobile 1.0//EN\" \"http://www.wapforum.org/DTD/xhtml-mobile10.dtd\">";
}
if($code=="wml"){
echo "<wml>";
}else{
echo "<html xmlns=\"http://www.w3.org/1999/xhtml\">";
}
if($code=="wml"){
echo "<card id=\"main\" title=\"about\">";///wml card title
echo "About Us
";/////page title in wml
}else{
echo "<head>";
echo "<title>About Us</title>";////xhtml page title
echo "</head>";
echo "<body>";
}
echo "<p align=\"center\">";
/////////////////// page content added below you may edit to your needs
echo "Mobilezonez.com Was Made So You Can Get Free Downloads,Chat With Friends,Learn About How to Code Scripts And More...
";
echo "This Was Made To Be A Friendly Site.Not To Make Enemies...
I Will be Updating This Script Weekly.Including More Downloads And Wap/web Scripts
";
if($code=="wml"){
echo "<a href=\"../wap/index.php\">Home</a>";///////wml refrence link
}else{
echo "<a href=\"../web/index.php\">Home</a>";///////if not we give them this link instead how bloody easy is that lol
}
echo "</p>";
if($code=="wml"){
echo "</card>";
echo "</wml>";
}else{
echo "</body>";
echo "</html>";
}
?>
/////////// if you find this tutorial useful and wana learn more add me on msn at the email address stated above
yes I am currently using this page atm lol but will be updating it alot now
<?php
/*
////////////////////////////////////////////////////////
// //
// www.mobilefonez.com //
// Downloads Script //
// By Andrew Haswell //
// andrew2005haswell@hotmail.com //
// Copyright 2007 //
///////////////////////////////////////////////////////
*/
//// You May Use This Code Anywhere You Feel Like if you Update It Please Let Me Know
//// to use this as a demo paste this link yoursite.com/about.php?code=wml or change the extension to xhtml
//// note::below is the ibwf core.php and config page links
//// just for your refrence !!
include("/wap/config.php");
include("/wap/core.php");
$code = $_GET["code"];// This is The Code That I will now use to display the wml function.
if($code=="wml"){
header("Content-type: text/vnd.wap.wml");
header("Cache-Control: no-store, no-cache, must-revalidate");
echo '<?xml version="1.0"?' . '>';
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"". " \"http://www.wapforum.org/DTD/wml_1.1.xml\">";
}else{
/////// if the browser isnt a wml browser they automatically get this page title instead of the previous
header("Content-type: text/html; charset=ISO-8859-1");
header("Cache-Control: no-cache, must-revalidate, max-age=0");
header("Pragma: no-cache");
echo '<?xml version="1.0"?' . '>';
echo "<!DOCTYPE html PUBLIC \"-//WAPFORUM//DTD XHTML Mobile 1.0//EN\" \"http://www.wapforum.org/DTD/xhtml-mobile10.dtd\">";
}
if($code=="wml"){
echo "<wml>";
}else{
echo "<html xmlns=\"http://www.w3.org/1999/xhtml\">";
}
if($code=="wml"){
echo "<card id=\"main\" title=\"about\">";///wml card title
echo "About Us
";/////page title in wml
}else{
echo "<head>";
echo "<title>About Us</title>";////xhtml page title
echo "</head>";
echo "<body>";
}
echo "<p align=\"center\">";
/////////////////// page content added below you may edit to your needs
echo "Mobilezonez.com Was Made So You Can Get Free Downloads,Chat With Friends,Learn About How to Code Scripts And More...
";
echo "This Was Made To Be A Friendly Site.Not To Make Enemies...
I Will be Updating This Script Weekly.Including More Downloads And Wap/web Scripts
";
if($code=="wml"){
echo "<a href=\"../wap/index.php\">Home</a>";///////wml refrence link
}else{
echo "<a href=\"../web/index.php\">Home</a>";///////if not we give them this link instead how bloody easy is that lol
}
echo "</p>";
if($code=="wml"){
echo "</card>";
echo "</wml>";
}else{
echo "</body>";
echo "</html>";
}
?>
/////////// if you find this tutorial useful and wana learn more add me on msn at the email address stated above
Comment