Hello.
Little problem with PHP Curl redirection.
I'm trying to log in to a web-chat usung GET method.
Everything goes well, but the problem is that the url changes to the redirected one when i'm being redirected from chat.example.com/login.php page to
chatserver.example.com/.
So i don't want to be redirected anywhere from my own server.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://chat.example.com/:8080/login?cid=820&nick=deliverme');
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_COOKIEJAR, 'tmp\cookies.txt');
curl_setopt($ch, CURLOPT_COOKIEFILE, 'tmp\cookies.txt');
$result = curl_exec($ch);
$info = curl_getinfo($ch);
echo $info['http_code'];
echo $result;
Thanks.
Page 1 of 1
Curl Redirection
Page 1 of 1

Sign In
Register
Help


MultiQuote