PDA

View Full Version : add a proxy browser to my website?



tdunks
03-19-2007, 04:26 PM
I own a large ammount of webspace and would like to make a kind of browser on there so I can go to any site download things ect. but have my IP concealed. Does anyone know of a way to do this?

Magnj
03-19-2007, 04:55 PM
I have no idea. there are places like this out there...try and get chunks of code from forums and such. I'm thinking the hardest part is writing the code to retrieve the page anonymously but if you know the protocols then maybe it won't be too hard.

ahmad
03-19-2007, 08:40 PM
Its not that hard. You take in the URL for input, ask the server for an HTTP result and return it to the user.. I don't know if it can be done in PHP, but in cgi it should be doable.

Axylone
03-22-2007, 04:14 PM
pretty easy to do in php, although good luck getting images to display correctly and links to work. Here's what I threw together a while back on a 5 minute whim:

<?php
$fp = fsockopen($_POST['domain'], 80, $errno, $errstr, 30);
if (!$fp) {
echo "$errstr ($errno)<br />\n";
} else {
$out = "GET /{$_POST['reststr']} HTTP/1.0\r\n";
$out .= "Host: www.example.com\r\n";
$out .= "Connection: Close\r\n\r\n";

fwrite($fp, $out);
$temp = '';
while (!feof($fp)) {
$temp .= fgets($fp, 128);
}
fclose($fp);
$temp = strstr($temp,'<');
if($_POST['replinks']=='on'){
$temp = str_replace('href="','href="http://'.$_POST['domain'].'/',$temp);
$temp = str_replace('src="','src="http://'.$_POST['domain'].'/',$temp);
$temp = str_replace("href='","href='http://".$_POST['domain'].'/',$temp);
$temp = str_replace("src='","src='http://".$_POST['domain'].'/',$temp);
$temp = str_replace('href="http://'.$_POST['domain'].'//','href="http://'.$_POST['domain'].'/',$temp);
$temp = str_replace('src="http://'.$_POST['domain'].'//','src="http://'.$_POST['domain'].'/',$temp);
$temp = str_replace("href='http://".$_POST['domain'].'//',"href='http://".$_POST['domain'].'/',$temp);
$temp = str_replace("src='http://".$_POST['domain'].'//',"src='http://".$_POST['domain'].'/',$temp);
}
echo $temp;
}
?>
the html form (change the form's action to whatever you name the php file):


<form name="form1" method="post" action="testpget.php">
Domain (eg. www.xtremesystems.org): <input name="domain" type="text" size="50"><br>
Rest of address (eg. forums/index.php) : <input name="reststr" type="text"><br>
(don't put a slash at the beginning or at the end of the domain)<br>
Replace Links?<input type="checkbox" name="replinks"><br>
<input type="submit">
</form>

tdunks
03-26-2007, 04:30 PM
can anyone get images to display fcorrectly and links to work including download links?

ahmad
03-27-2007, 02:27 AM
You would have to somehow download images and other content right to your server then show it on the screen...

You might be able to do it using the curl library for PHP:

http://curl.haxx.se/libcurl/php/

tdunks
03-27-2007, 01:16 PM
see im a beginner at php and not too good in html either. i can download to my server because it has over 100gb os space and unlimited bandwidth

madman2233
04-21-2007, 12:46 PM
i use http://www.jmarshall.com/tools/cgiproxy/

but that requires cgi access and perl, so im not sure if you can use it.