Follow Redirects in cURL Script
This commit is contained in:
parent
b420bbf6da
commit
3be31c69e9
1 changed files with 1 additions and 0 deletions
|
@ -43,6 +43,7 @@
|
||||||
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
|
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
|
||||||
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 2);
|
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 2);
|
||||||
curl_setopt($ch, CURLOPT_TIMEOUT, 5); //timeout in seconds
|
curl_setopt($ch, CURLOPT_TIMEOUT, 5); //timeout in seconds
|
||||||
|
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); // Follow redirects
|
||||||
|
|
||||||
//execute post
|
//execute post
|
||||||
$result = curl_exec($ch);
|
$result = curl_exec($ch);
|
||||||
|
|
Loading…
Reference in a new issue