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

curl-and-php

problem using curk with posting passwords

From: Z. Rashid <zrashid__at_hotmail.com>
Date: Tue, 20 May 2003 17:35:10 +0000

Hi

My problem is best understood if you take a look at the site
http://www.advfn.com/p.php?pid=news
I am trying to create a socket to get the source from the page that ensues
when you type in a correct username password. I have tried using
curl_setopt($ch,CURLOPT_USERPWD,"zrashid_:ycdgbhud");
but this only works for basic auuthentication.

I tries to post the fields but a problem ocurrs I think this is because the
second textbox is a password box (as when I dump what curl retrieved I see
that the username text bok IS filled but the password text box is empty)
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "username=zrashid_&password=ycdgbhud");
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);

There are cookies that are involved (there is a log in automatically
tickbox) but there are multiple ones saved on the disk from the advfn
wesbite and I dont know how to formulate them. I tried
curl_setopt($ch, CURLOPT_COOKIE, "filename in same directory as script");
but this did not work either.

My question is is there a way of passing multiple cookies, and is there a
way of sending the post as a password and accepting the ensuing cookie (and
keep using it as the news site will be accessed every 15 minutes for the
whole day)

Thank You very much for your time

Z.Rashid

_________________________________________________________________
STOP MORE SPAM with the new MSN 8 and get 2 months FREE*
http://join.msn.com/?page=features/junkmail

-------------------------------------------------------
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore.
Now part of Progress Software. http://www.objectstore.net/sourceforge
Received on 2003-05-21