Reputation:
Is there a way in php to set the value for the Referrer header that gets sent along with the HTTP request ?
are Understanding Browser this header? for example replace:
< meta http-equiv="Referrer" content="never"/ >
by
header('Referrer: never');//sent header in php
Upvotes: 2
Views: 421
Reputation: 2212
You have typed it wrong. It must be "Referer". Yes, normally this is the wrong one though, it is defined like this.
Upvotes: 0
Reputation: 944564
If you are making the HTTP request from PHP (e.g. with cURL), yes.
You can't control the referer header that a browser will make though.
<meta http-equiv="Referrer" content="never" />
Meta http equiv allows you to set something that is (theoretically) equivalent to an HTTP Response header. Referer is a Request header so that won't do anything.
Upvotes: 1