Answer the question
In order to leave comments, you need to log in
How to transfer REFERER PНP?
Hello!
I have a PHP script that accesses a page on the server, access to which is configured through a referer.
How can I specify in this script the referer of the site from which it accesses the server? And then, the server does not recognize its referrer by default.
Thank you!
Answer the question
In order to leave comments, you need to log in
It all depends on how the script actually addresses.
If curl_exec() is used, the referer is specified in curl_setopt($ch, CURLOPT_REFERER, $referer_string).
If the built-in PHP wrapper of the file_get_contents() type is used, then through stream_context_create().
And if everything is done kosherly via fsockopen() - you yourself form the HTTP request...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question