Wml/xhtml In Same Page Tutorial

Started on the old forum in January 2009 · view the original in the archive · old links redirect here

3 replies · 979 views · started 17 years ago · 1 min read

3 participants
ozziemale31 Lead · 861 posts #1

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 /* //////////////////////////////////////////////////////// // // // <http://www.mobilefonez.com> // // Downloads Script // // By Andrew Haswell // // [andrew2005haswell@hotmail.com](mailto: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 " "; /////////////////// 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 " "; 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

External image (may be gone) External image (may be gone)

External image (may be gone)

*****

**Dont Ask Me Dumb Questions.Or you'l get a Dumb Answer.. Want A Profesional Logo or Theme For Your wap site Pm Me.If I Have The Time Ill Make It For Free ***

metulj Super moderator Principal · 1,726 posts #3

WML and XHTML in same file has been also done in wizard's FunMobile version 😍

It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt. ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ ! ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.

キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!

subzero Super moderator Fellow · 3,954 posts #4

That ok code thou always have wml and xhtml in one place...

This means it will not load two headers in one page more faster loading if u place in other php file like

headers.php

footers.php

body.php

Load with all it will show wml stuff and xhtml with a cut...

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close