wappy 0 Report post Posted July 3, 2006 This is a source code viewer that will workl on wap/mobile sites but you can easily convert it to work on web im sure ;-) <?header("Content-Type: text/vnd.wap.wml");echo '<?xml version="1.0" encoding="utf-8"?><!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://forums.xisto.com/no_longer_exists/ http-equiv="Cache-Control" content="no-cache" forua="true"/></head><card title="s60.nerds.at">'; print "<p>";if ($url == "") { echo "<small><b>Enter url:</b></small><br/><input type=\"text\" name=\"url\" maxlength=\"999\" value=\"http://\" emptyok=\"false\"/><br/><small><anchor>»View source code<go href=\"$PHP_SELF?url=$(url)\" method=\"post\"><postfield name=\"url\" value=\"$(url)\"/></go></anchor></small>"; }if ($url == "$url") { $udata=@file_get_contents("$url");$udata = str_replace("$","$$",$udata);$udata = str_replace("&","&",$udata);$udata = str_replace("'","'",$udata);$udata = str_replace("<","<",$udata);$udata = str_replace(">",">",$udata);$udata = str_replace("\"",""",$udata);$udata = str_replace("-","",$udata); echo "<small><small>$udata</small></small><br/>"; }if ($udata==!""){echo "---<br/><small><a href=\"$PHP_SELF\">«Back</a></small><br/>";} echo "<small>---<br/><a href=\"index.php\">s60.nerds.at HOME</a><br/>---<br/>© wappyCULT 2006-2007</small>";echo "</p> </card> </wml>";?> Share this post Link to post Share on other sites
iGuest 3 Report post Posted May 15, 2008 wao code loaction Wap Source Code Viewer Replying to wappy Hi thank you so much for the WAP code but I have a question where do iI place it on my html page ?? is this to be located in the head or body I'm not sure where to paste it???? Can you please let me know?? Thanks -question by george Share this post Link to post Share on other sites
wappy 0 Report post Posted June 15, 2008 That is the WHOLE page. Just upload it to any server and view from your mobile or opera.. this is real old now i doubt it works with php5.Maybe mr feeback should learn to check the post date no? LOL Share this post Link to post Share on other sites
seba1killer 0 Report post Posted June 15, 2008 It still works, but the filter doesnt work in all webs so some may load with errors. For example, hex codes in the web page or encoded web pages wont be shown as source code, they will be show as webs.The best way to filter this is with a XSS filter, in the internet are a lot of them.Regards Share this post Link to post Share on other sites
iGuest 3 Report post Posted June 24, 2008 a simple project made in wap? Wap Source Code Viewer Replying to wappy Honestly I'm quite familiar with wap,,,,I want to learn more in wap, because this was the assigned topic in my group.And were going to produce a project that was made in wap... Pls help me,...Thanks! -reply by harvey Share this post Link to post Share on other sites