PHP – CURL – redirecting to main domain after login, which I don’t want

I am using curl to logging in to a aspx file. I have managed to login but after login, it goes to the main site.
for example,
$url="https://www.test.com"
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_COOKIEJAR, $ckfile);
curl_setopt($ch, CURLOPT_COOKIEFILE, $ckfile);
curl_setopt($ch, CURLOPT_HEADER, FALSE);…
PHP – CURL – redirecting to main domain after login, which I don't want

See original post by ahdsan

Leave a Reply