![]() |
cookies and phpdig
Hi all,
Does phpDig send cookies along with the links it follows? I have set up a website : http://www.harmoni-ca.info/~pclaeys/test/ index.php sets a cookie named "TEST" if the cookie is set correctly a link Next (to Next.php) appears, if you follow this link the cookie "TEST" is red using $_COOKIES["TEST"] if the cookie is found a link Set (to Set.php) appears otherwise a link NotSet (to NotSet.php) appears phpDig always follows the link : NotSet.php SITE : http://www.harmoni-ca.info/ Exclude paths : - @NONE@ 1:http://www.harmoni-ca.info/~pclaeys/test/Next.php (time : 00:00:05) + level 1... 2:http://www.harmoni-ca.info/~pclaeys/test/NotSet.php (time : 00:00:15) No link in temporary table Should I adjust the configuration file for phpDig to send the cookie ? Thx :)) Greets Petra |
Hi. If you look in robot_functions.php for the phpdigTestUrl function and in this function look for "parse cookies" you will see some code. Compare this code with the examples on this page and look at the phpDigMakeCookies function in robot_functions.php to see how PhpDig creates the $cookiesSendString variable.
|
Be careful though, the phpDigSetHeaders() function makes an ini_set('user_agent'...) call that isn't supported in versions of php < 4.3 (afaik)
As far as I can tell from the phpdig code, in versions of PHP 4.1 and 4.22 (the ones I tested on) Cookies are not sent properly for GET requests, only HEAD requests. This is because the actual GET request of a file done in the phpdigTempFile(...) function is done using the PHP file(...) function not a home made GET request. I think the authors use of ini_set to pass along the cookies is quite clever, it's too bad it's not supported in earlier versions of PHP. |
All times are GMT -8. The time now is 12:33 AM. |
Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.