where will i put that? add code?
PHP Code:<?php
header('Content-Type: text/html; charset=utf-8');
echo '<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Source code viewer</title>
<meta http-equiv="Pragma" content="no-cache" />
</head>
<body>';
if(isset($_GET['url']) && substr($_GET['url'],0,7) == 'http://')
{
$source = file_get_contents($_GET['url']);
echo '<div>Source code</div><div>'.htmlspecialchars($source).'</div><hr/>';
}
echo '<form action="'.$_SERVER['PHP SELF'].'" method="get">
<div>
Source URL:
<input type="text" name="url" value="http://" />
<input type="submit" value="Show source" />
</div>
</form>
</body>
</html>';
?>
Advertise your mobile site for FREE with [Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]
where will i put that? add code?
on a php page
i think you r very new dude.this is very simple code. create php page and past these code. now ready demo [Only registered and activated users can see links. Click Here To Register...]Originally Posted by RJNzone [Only registered and activated users can see links. Click Here To Register...]
Last edited by akela; 06-09-10 at 11:18.
i'm very sorry with that.. where can i learn more? i'm new here sir..
Great work! Thanks for sharing![]()
Please add color tags
Some update To the script
warping the HTML
updated these 2LinesPHP Code:<?php
header('Content-Type: text/html; charset=utf-8');
echo '<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Source code viewer</title>
<meta http-equiv="Pragma" content="no-cache" />
</head>
<body>';
$source = file_get_contents("http://$domain");
$new = htmlentities($source);
echo '<div>Source code</div><div>'.nl2br($new).'</div><hr/>';
echo '<form action="'.$_SERVER['PHP SELF'].'" method="get">
<div>
Source URL:
<input type="text" name="url" value="http://" />
<input type="submit" value="Show source" />
</div>
</form>
</body>
</html>';
?>
demo at - [Only registered and activated users can see links. Click Here To Register...]PHP Code:$source = file_get_contents("http://$domain");
$new = htmlentities($source);
echo '<div>Source code</div><div>'.nl2br($new).'</div><hr/>';
:p
Last edited by mkjmkj; 02-09-12 at 10:03.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks