Ver original$code = curl_getinfo($handler, CURLINFO_HTTP_CODE);
Ver originalcurl_setopt($handler, CURLOPT_URL, $url);$header = curl_exec($handler);...preg_match('/Location:(.*?)\n/', $header, $matches);$url = trim(array_pop($matches));....
Ver originalcurl_setopt($handler, CURLOPT_URL,$url);