php - curl request works from one server and give 403 on another -
i using curl hit url , contents , below code
$url = 'http://uber.com'; $ch = curl_init(); curl_setopt_array($ch, array( curlopt_url => $url, curlopt_header => false, curlopt_followlocation => true, curlopt_ssl_verifypeer => false, curlopt_returntransfer => true, curlopt_useragent => 'mozilla/5.0 (x11; linux x86_64) applewebkit/537.16 (khtml, gecko) \ chrome/24.0.1304.0 safari/537.16', curlopt_connecttimeout => 180, curlopt_timeout => 180 + 60, curlopt_cookie => 'lang=en;' )); $response = curl_exec($ch); var_dump($response);
it gives me content when execute script on local server while executing on staging , production server, situated in us, give 403-forbidden error. tested same server in , works fine. appreciated.
Comments
Post a Comment