Re: HTTP_Clients and Files - Part 2

From: Date: Tue, 16 Nov 2004 18:06:24 +0000
Subject: Re: HTTP_Clients and Files - Part 2
References: 1 2 3 4  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-15563@lists.php.net to get a copy of this message
On Tue, 16 Nov 2004 11:51:31 +0300, Alexey Borzov <borz_off@cs.msu.su> wrote: > Hi, > > Andrew Nagy wrote: > > For some reason, this site isn't using cookies for it's sessions, it's > > passing the id in the query string and through hidden fields. > > > > So are you saying that I need to parse through the resulting HTML to > > pull out the id from a link or something? What if their is not link on > > the page and it is just a form? > > I'd suggest adding a Listener to the Client object when you do a login to this > site. That Listener will wait for "httpRedirect" event and extract a session Id > from the event's data (which is really a redirect URL). That's a bit easier and > less error-prone than parsing HTML. > Assuming there *is* a redirect then this should work well. Otherwise a simple preg really isn't all that bad. -- Justin Patrin

« previous php.pear.general (#15563) next »