Hello Mr.feldon23 🙂
What i want to do is an anonymous browser, just like CGI-Proxy, but doing it in PHP.
My program works like this:
1- connect and sends a GET command to the entered website.
2- send the user back the out-put of the website (html code/images/etc...)
its working fine, only that when i enter a website i get two servers info, MY SERVER info (the one that the php file is on), and the OTHER SERVER info (info about the website server i entered), then the browser will not show one of the headers, the first one, and the second header will manage it as an html code.
So, I dont want the first header (my servers header), is there is a way i can do it?
Here is the code (its still at the begining VEREY SIMPLE).
<?php
$data = "";
if ( $sock = fsockopen("$url", 80, &$errno, &$errstr,1))
{
fputs($sock, "GET $page HTTP/1.0\n\n\n");
while (!feof($sock))
$data = $data . fgets($sock, 1024);
print $data;
} else {
print "Error: $errstr ($errno)";
};
unset($sock);
?>