Hi, I am currently using curl to fill an form, but after completion of the post, the other script which handles the form is redirecting to other url , now I want to get the url , for which the script is redirecting to a variable.
Thanks..
Hi, I am currently using curl to fill an form, but after completion of the post, the other script which handles the form is redirecting to other url , now I want to get the url , for which the script is redirecting to a variable.
Thanks..
You would use
curl_setopt($CURL, CURLOPT_HEADER, TRUE);
And parse the headers for the location
header
You may want to set the CURLOPT_FOLLOWLOCATION to true.
Or set the CURLOPT_HEADER to true and then use regexp to get the Location header.