Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Spoof REFERER Variable ? 1

Status
Not open for further replies.

nomaam22

Programmer
Oct 6, 2006
9
CA
Is it possible to spoof the REFERER variable when forwarding to an outside page?

For example:

The page is directed through a header

$URL=" header ("Refresh: 0; url=$URL");

Now is it possible to set the REFERER value?

I have located this documentation which suggest it would be possible.


However I am unsure on how to implement it in my example.

Any help would be appreciated.

Thanks.
 
Hi

nomaam22 said:
Now is it possible to set the REFERER value?
The Referer is a HTTP request header, so it is set by the user agent ( the HTTP client, the software making the request ). You can set the Referer in PHP only for the requests made by PHP.

In the situation described in the mentioned example, PHP makes the request. So setting the Referer from PHP is possible.

In the situation described by you, PHP instructs the user agent to make a request, then the user agent makes the request. So setting the Referer from PHP is not possible.


Feherke.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top