Re: PHP accept cookies?



On May 30, 8:46 pm, "Edward Z. Yang" <edwardzy...@xxxxxxxxxxxxxxxxx>
wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

ReGenes...@xxxxxxx wrote:
Problem- I need to log into the site from a PHP script- and when I
send my login info, it responds with the following:

If you are using cURL, use curl_setopt()http://us2.php.net/manual/en/function.curl-setopt.phpwith
CURLOPT_COOKIEJAR and CURLOPT_COOKIEFILE to ensure cookies sent back get
carried over.

You can also use a PHP browser emulator like SimpleTest to get similar
functionality.
Although I can't say, for sure, I suspect the problem may be more
complicated then that.

What if the cookies aren't being set with HTTP headers but rather,
with javascript? cURL won't catch them, then, and unless SimpleTest
has a full blown javascript parser, I doubt it will, either.

So what if the Flash file, itself, is setting the cookies?

Well, I guess you could always decode the Flash file and create your
own "cookiejar" from that...

The Flash specifications are available here:

http://www.adobe.com/licensing/

(scroll down to "Macromedia Flash (SWF) and Flash Video (FLV) File
Format Specification (Version 8)")

.



Relevant Pages

  • Re: http-access2 multi-part from upload
    ... also, and this of off-topic but important, i had three different versions of curl and all three required different command line flags to get going, with only two versions being able to actually upload to rubyforge due to a bug in cookied handling. ... in the first case the cookies are not sent to the client and the cookie file ...
    (comp.lang.ruby)
  • Re: [PHP] libcurl (cookies across cURL session). . .?
    ... Is there any way at all by which to persist cookies across cURL ... Basically I have a login page that sets cookies and looks ... | such as forms, properties, sessions, and caches. ...
    (php.general)
  • RE: [PHP] Curl and cookies
    ... Set option "HEADER" true for the login part in Curl ... Make a new call to a new page, using the cookies with curl option COOKIE. ...
    (php.general)
  • Re: [PHP] Curl redirection problem.
    ... But bear in mind that any cookies you've set up with curl will not be ... there when you redirect the client since they're in your cookie jar not ... If all you want to do is log them in using a username and password that you have simply fake the login form from the other site on your page with hidden text fields, auto-fill it with the details and set the action to the same place the login form on the other site submits to. ...
    (php.general)
  • Re: CURL form posting to self referencing form action
    ... > point CURL to the action target to pass form data. ... This is odd because Curl is supposed to do collect any cookies. ... PHP Classes - Free ready to use OOP components written in PHP ... PHP Reviews - Reviews of PHP books and other products ...
    (comp.lang.php)