开发者

cURL PHP and request referrer

开发者 https://www.devze.com 2023-03-11 01:41 出处:网络
what is default referrer URL which from are coming cURL requests in PHP?Is it customizable? For example when I make this request..

what is default referrer URL which from are coming cURL requests in PHP?Is it customizable? For example when I make this request..

 $curl = curl_init("https://3dsecure.csas.cz/transaction");
        curl_setopt_array($curl, array(
            CURLOPT_POST => true,
            CURLOPT_POSTFIELDS => http_build_query($data),
        CURLOPT_AUTOREFERER => true,
            CURLOPT_RETURNTRANSFER =&开发者_如何学Gogt; true,
        ));

…what will see the requested script this request is coming from?

Thanks


Default referer is none. You can set your own via CURLOPT_REFERER option.

CURLOPT_AUTOREFERER is for redirects.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号