PDA

View Full Version : Cookie management


jbc
03-11-2004, 03:56 AM
Hi all,

I am using phpdig on a web site divided in different parts : public, private, admin, ...

The authentication macanism is based on a cookie named SID (php session id).

My project is to index automatically the whole site using the following process :

- a batch create a session on the portail

- the same batch sends the SID value to the spide.php script

- the spider.php uses the ?SID=<value_sent_by_script> of Header:Cookie SID=<value_sent_by_script > for every requests sent to the site.

Any idea how to implement it in the code ?

Thanx
jb

Charter
03-11-2004, 03:23 PM
Hi jbc, and welcome to PhpDig.net!

Perhaps this (http://www.phpdig.net/showthread.php?threadid=554) thread might help, or are you looking to have PhpDig actually do the authentication?

jbc
03-12-2004, 12:35 PM
Thanks for helping ;-)

What I whant to do is to add an extra option to the spider.php crawler : this option will contain a string like "SID=202ab26bc69" and will be sent as a cookie by phpdig while it is browsing a site.

for instance :

spider.php http://www.mysite.com "SID=jqgjgqsg"
will send the header
Cookie: SID=jqgjgqsg
for every sent to www.mysite.com

Any idea or patch to use ?