0

Im just asking if there any possibility to change referer in header using PHP like this :

header("Referer: http://www.customwebsite/details/file");

//download from another website who check referer before the begin of the file

header("Location: http://www.customwebsite/download/file.pdf");
AHmedRef
  • 2,555
  • 12
  • 43
  • 75
  • No. Referer is set by the browser doing the redirect, and cannot be controlled directly by your server. You could do a double redirect `wherever->/details/file->/download/file.pdf`, so that the "previous" page is the referer you want – Marc B Feb 11 '16 at 20:14
  • you could use curl() –  Feb 11 '16 at 20:15
  • You have to make the request from your server, not from the client. Requests from your server to another server are under full control of your scripts, unlike what is happening on the client side. Use the php `cURL` extension or the `guzzle` wrapper for that. – arkascha Feb 11 '16 at 20:18
  • How can'i do a redirection based on curl with a custom header ? – AHmedRef Feb 11 '16 at 20:37

0 Answers0