Follow Redirects in cURL Script

This commit is contained in:
earnolmartin 2018-05-20 00:26:29 -06:00
parent b420bbf6da
commit 3be31c69e9

View file

@ -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);