cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

Re: Save CURL sessions

From: Brian Wilkins <brian_at_hcc.net>
Date: Tue, 12 Oct 2004 11:47:19 +0000

Best way to solve this is through session cookies. The script will end before
curl will be allowed to "stay alive".

On Tuesday 12 October 2004 03:33 pm, Harry Fearnley wrote:
> Tommaso Trani wrote:
> > I would like to handle a curl connection between multiple executions of
> > my php script.
> > For example I make a login to a private area (with curl) and then I wont
> > make some action in this area.
> > I would like to make just one time the login, than save the curl session
> > informations in a cookie, file or php session. So I can get this info
> > between multiple executions of my php script avoiding to make again the
> > login.
> >
> > Is it possible? I've tried to store the resource returned by curl_init
> > in a sessions, but, of course, this way doesn't work because it's a
> > resource and not a structured variable (I've tried using serialize, but
> > it's a resource and doesn't work).
>
> If I have understood you correctly ...
>
> Can you make the action of the HTML form to call itself again,
> and simply pass the information as HIDDEN values in a form?
> Something like this:
>
>
> <FORM ENCTYPE="multipart/form-data" ACTION="this_file.html" METHOD="post">
> <INPUT TYPE="hidden" NAME="hidden1" VALUE="10485760">
>
>
> Harry
>
> +-+-+-+-+.+-+-+-+-+.+-+-+-+-+.+-+-+-+-+.+-+-+-+-+.+-+-+-+-+.+-+-+-+-+.+-+-+
>-+-+- http://www.eng.ox.ac.uk/people/Harry.Fearnley
> Dept Engineering Science, Parks Rd, Oxford, OX1 3PJ, UK
> Tel: +44 (0)1865 273928 -- Fax: +44 (0)1865 273010

-- 
--
Heritage Communications Corporation
  Melbourne, FL     USA     32935
http://www.hcc.net
Received on 2004-10-12