Home > Archive > PHP Language > October 2006 > Changing the referring page/ip
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Changing the referring page/ip
|
|
| michal2@gmail.com 2006-10-30, 7:03 pm |
| Hi,
I'm trying to open a socket to a remote machine using the following php
script:
$fp = fsockopen ($site_url, 80, $errno, $errstr, 30);
if (!$fp) {
echo "$errstr ($errno)<br />\n";
return;
}
fwrite ($fp, "GET " . sprintf($video_doc, $id) . " HTTP/1.0\r\n\r\n");
while (!feof($fp)) {
$results .= fgets($fp,1024);
}
Can I change the referring page / ip so that it seems the call is
coming from my clients and not from me as a webserver?
| |
| AlexVN 2006-10-30, 7:03 pm |
|
michal2@gmail.com wrote:
> Can I change the referring page / ip so that it seems the call is
> coming from my clients and not from me as a webserver?
You cannot change the IP, because it is tracked by the TCP/IP itself.
If you change the IP how does server get to which address it should
send the answer? However, you can try to add some extra HTTP header,
like X-Forwarded-For and Referer, to tell the server that your computer
is just a proxy. Which does not guarantee that it will not be banned in
case of illegal activity :-)
|
|
|
|
|