cURL , get redirect url to a variable

Easy way to find the redirected url (if you don’t want to know in advance)

$last_url = curl_getinfo($ch, CURLINFO_EFFECTIVE_URL);

Leave a Comment