Wml/xhtml In Same Page Tutorial

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Wml/xhtml In Same Page Tutorial

    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 &#39;<?xml version="1.0"?&#39; . &#39;>&#39;;
    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 &#39;<?xml version="1.0"?&#39; . &#39;>&#39;;
    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









    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


    #2
    this is the actual script demo
    Attached Files









    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

    Comment


      #3
      WML and XHTML in same file has been
      also done in wizard&#39;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ノ刀ノイリ!

      Comment


        #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...
        _______
        Info & Tips
        php.net
        w3schools.com

        Comment

        Working...
        X