|02-05-2004, 04:56 AM||#1|
Join Date: Feb 2004
cookies and phpdig
Does phpDig send cookies along with the links it follows?
I have set up a website :
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 :
(time : 00:00:05)
(time : 00:00:15)
No link in temporary table
Should I adjust the configuration file for phpDig to send the cookie ?
Last edited by Darknss; 02-05-2004 at 04:59 AM.
|02-05-2004, 10:27 AM||#2|
Join Date: May 2003
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.
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
|03-05-2004, 07:38 PM||#3|
Join Date: Nov 2003
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.
|Thread||Thread Starter||Forum||Replies||Last Post|
|Logout does not clear cookies||manfred||Bug Tracker||6||07-12-2004 02:58 PM|
|bug with cookies?||fredh||Mod Submissions||6||05-04-2004 06:47 PM|