PhpDig.net

Go Back   PhpDig.net > PhpDig Forums > Troubleshooting

Reply
 
Thread Tools
Old 02-05-2004, 05:56 AM   #1
Darknss
Green Mole
 
Join Date: Feb 2004
Posts: 1
Question 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

Last edited by Darknss; 02-05-2004 at 05:59 AM.
Darknss is offline   Reply With Quote
Old 02-05-2004, 11:27 AM   #2
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
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.
Charter is offline   Reply With Quote
Old 03-05-2004, 08:38 PM   #3
fredh
Green Mole
 
Join Date: Nov 2003
Posts: 11
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.
fredh is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Logout does not clear cookies manfred Bug Tracker 6 07-12-2004 03:58 PM
bug with cookies? fredh Mod Submissions 6 05-04-2004 07:47 PM


All times are GMT -8. The time now is 11:33 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.