curl-and-php
skipped cookie gndindex.com
Date: Mon, 28 Nov 2005 13:43:03 +0000
Hi,
I am trying to login to the site but the cURL/PHP Binding is not setting the
cookie of this domain.
After setting debug mode of script i get * skipped cookie. Full header
request / Response is attached below.
Can you please help me why cURL/PHP Binding is failing to set this domain
specific cookie ?
* About to connect() to gndindex.com port 80
* Connected to gndindex.com (80.166.5.182) port 80
>GET /forums/index.php?act=Login&code=00 HTTP/1.1
Host: gndindex.com
Pragma: no-cache
Accept: */*
Referer:
< HTTP/1.0 200 OK
< Date: Mon, 28 Nov 2005 13:38:07 GMT
< Server: Apache/1.3.33 (Unix) mod_python/2.7.10 Python/2.2.2
mod_webapp/1.2.0-dev mod_perl/1.29 mod_throttle/3.1.2 PHP/4.3.11
FrontPage/5.0.2.2635 mod_ssl/2.8.22 OpenSSL/0.9.7e
< X-Powered-By: PHP/4.3.11
* skipped cookie with bad tailmatch domain: .gndindex.com< Set-Cookie:
ipbsession_id=6b46685bbea60ea5dcd3bd0b266a11e5; path=/; domain=.gndindex.com
< Content-Type: text/html
< X-Cache: MISS from cache.blaze.net.pk
< Connection: close
* Closing connection #0
<?php
$cookie_file_path =
"C:/Inetpub/wwwroot/sept2005/phptrack/curl/forum_help_codes/cookie.txt";
$url = "http://gndindex.com/forums/index.php?act=Login&code=00";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file_path);
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file_path);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_VERBOSE, 1);
$result = curl_exec ($ch);
curl_close ($ch);
?>
Sincerely,
Muhammad Imran Khalid
(PHP Web Developer)
Email: imranlink_at_hotmail.com
Phone: +92 55 6602955
..................................................
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2005-11-28