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

curl-and-php

Re: Save CURL sessions

From: Harry Fearnley <Harry.Fearnley_at_eng.ox.ac.uk>
Date: Tue, 12 Oct 2004 16:41:25 +0100

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

I have tried my "solution" below with some success. Each time I click
the "submit" button, the page is refreshed (with potentially very
different information), and information is simply passed onwards
from one state to the next ...

Have I misunderstood your comment?

Harry

>
>
> 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
>
>

-- 
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
Received on 2004-10-12