I'll start it off:
Code: Select all
<?php
if (!$url) { die("You need to set your url. Example: browser.php?url=http://www.yourdomain.com/"); }
$strings = $_SERVER["QUERY_STRING"];
$url = str_replace("url=", "", $strings);
?>
<html>
<base href="<? echo $url; ?>">
<head>
<title>Browser - <? echo $url; ?></title>
</head>
<?
$lines = file($url);
foreach ($lines as $line_num => $line) {
$line = eregi_replace("href=/", "hrXef=$PHP_SELF?url=$linkback/", $line);
$line = eregi_replace("href="/", "hrXef="$PHP_SELF?url=$linkback/", $line);
$line = eregi_replace("href="", "hrXef="$PHP_SELF?url=", $line);
$line = eregi_replace("href='/", "hrXef='$PHP_SELF?url=$linkback/", $line);
$line = eregi_replace("href='", "hrXef='$PHP_SELF?url=", $line);
$line = eregi_replace("href=", "$PHP_SELF?url=", $line);
$line = str_replace("hrXef=", "href=", $line);
echo $line . "\n";
}
?>-Add atleast 3 lines
-No external images, php files, etc will be used
-all php coding above shall reside in one php document (browser.php)
Let the games begin!
