views:

143

answers:

1

Hi
I'm using the following simple PHP proxy script but am getting a sporadic message at the destination site.

I'm thinking that perhaps it may have something to do with the HTTP_REFERER header, although I'm not explicitly defining it.

Can anyone tell me how to explicitly turn off or leave the HTTP_REFERER header blank?

Thanks in advance!

$url = $_GET['path'];
readfile($path);
A: 

I don't think the HTTP wrapper to readfile() sends any special headers, let alone REFERER.

What leads you to the conclusion that it does?

Pekka
Agreed - I'm rather confused by the OP's question .
Mr-sk
Sidenote: That snippet is a security concern:ie: host.com?path=../../etc/passwd$url = $_GET['path'];readfile($path);You get the idea?
Mr-sk
Good point. ----
Pekka
@Mr-sk.... Better yet... `?path=../../../../../../../etc/passwd` to ensure you **get to the root of the problem** if you *know what I'm sayinnnn* (lol)
cballou