Don't know if this will help but this is as far as I got looking into the idea of a Curl-less PHP proxy.
PHP Code:
<?php
$refer = $_SERVER['HTTP_REFERER'];
$fullstring2 = $_SERVER['QUERY_STRING'];
$fullstring3 = '';
if($fullstring3==$fullstring2)
{
$fullstring = 'http://www.google.com';
}
else if(preg_match('/\?[^.=]*\.[^.]/','?'.$fullstring2))
{
$mystring= $_SERVER['QUERY_STRING'];
$fullstring=$fullstring2;
$fullstring = preg_replace('/http:\/\//i','',$fullstring);
$fullstring = "http://$fullstring";
}
if ($fp = fopen($fullstring, 'r')) {
$content = '';
// keep reading until there's nothing left
while ($line = fread($fp, 1024)) {
$content .= $line;
}
$site = $_SERVER['SERVER_NAME'];
$curl = "(";
if(preg_match('/http:\/\/[^.]*\//i',$fullstring, $match)==0)
{
preg_match('/http:\/\/[^\/]*/i',$fullstring, $match);
}
else
{
preg_match('/http:\/\/[^\/]*\//i',$fullstring, $match);
}
$baseurl = $match[0];
$stringurlo = 'http://'.$site.'/index.php?';
$stringurl = 'http://'.$site.'/index.php?'.$baseurl.'/';
//src
$content = preg_replace('/src="http:\/\//i','src="'.$stringurlo,$content);
$content = preg_replace('/src="\.\//i','src="'.$stringurl,$content);
$content = preg_replace('/src="\//i','src="'.$stringurl,$content);
//href
$content = preg_replace('/href="http:\/\//i','href="'.$stringurlo,$content);
$content = preg_replace('/href="\.\//i','href="'.$stringurl,$content);
$content = preg_replace('/href="\//i','href="'.$stringurl,$content);
//action
$content = preg_replace('/action="http:\/\//i','action="'.$stringurlo,$content);
$content = preg_replace('/action="\.\//i','action="'.$stringurl,$content);
$content = preg_replace('/action="\//i','action="'.$stringurl,$content);
//fix forms
$content = preg_replace('/<input/i','<input',$content);
$content = preg_replace('/http%3A%2F%2F/','http%3A%2F%2F'.$site.'%2Findex.php%3Fhttp%3A%2F%2F', $content);
echo $content;
}
?>
Obviously there's LOADS that doesn't work, it was just a very basic start to my thoughts but maybe there's something there you guys can draw from. Form redirects were one thing that particularly stumped me.
To use this one you can name it whatever.php then you access the site like this whatever.php?Google would access google.
Anywaaaay, I look forward to seeing more developments from you 
B
Bookmarks