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

curl-and-php

Re: Getting and passing a cookie...

From: Paperstuff.com <contact_at_paperstuff.com>
Date: Sun, 16 Feb 2003 22:43:27 -0800

Hi Daniel,

I actually put a thing out that said $25 for anyone that can get it going. The version I posted has since been updated. We were using FOLLOWLOCATION and added VERBOSE this afternoon. We were even able to see the cookie. We tried to get it to write to the specified file, but it wouldn't write to cookies.fil or cookies.txt or the same directory the PHP file was that we were using. Below is eBay's response-header:

------------------------------------
Getting page...
HTTP/1.1 100 Continue Server: Microsoft-IIS/4.0 Date: Mon, 17 Feb 2003 06:41:03 GMT HTTP/1.1 302 Object Moved Server: Microsoft-IIS/4.0 Date: Mon, 17 Feb 2003 06:41:03 GMT Connection: close Location: http://signin.ebay.com/aw-cgi/eBayISAPI.dll?MfcISAPICommand=SignInWelcome&siteid=0&co_partnerId=2&UsingSSL=0&ru=&pp=&pa1=&pa2=&pa3=&i1=-1&pageType=-1&userid=*********&pass=********&keepMeSignInOption=1 HTTP/1.1 200 OK Server: Microsoft-IIS/4.0 Date: Mon, 17 Feb 2003 06:41:03 GMT Connection: close Content-Type: text/html HTTP/1.1 200 OK Server: Microsoft-IIS/4.0 Date: Mon, 17 Feb 2003 06:41:07 GMT Connection: close Content-Type: text/html
------------------------------------

Thank you for any help you can offer or if you know anyone that will do this sort of thing for hire. If you are interested, let me know. Have a good night,

Aaron

  ----- Original Message -----
  From: Daniel Stenberg
  To: curl and php list
  Sent: Sunday, February 16, 2003 9:25 PM
  Subject: Re: Getting and passing a cookie...

  On Sun, 16 Feb 2003, Paperstuff.com wrote:

> I need this fixed within 48 hours.

  Then consider hiring someone to fix it for you.

> We have a PHP script to upload auctions to eBay. They changed their login
> page and we can't get logged in now. We are able to get the cookie, but
> don't know how to write it to a file on our server.

  You don't know how to write what? The cookie? Using COOKIEJAR, you'll get all
  known cookies written to the given file when you close the curl "handle".

> Also, how to pass it back.

  By loading/setting the cookie before a request, possibly by using COOKIEFILE.

> USERNAME and PASS have been inserted where you need to put a working
> username and password. Registration is free, so it is easiest if you sign
> up for an account if you don't already have one.

  [source code cut out]

  The source looked fine to me (not being a PHP hacker at all). What is it more
  exactly that doesn't work?

  What about adding some traces (VERBOSE or similar) to display:

  * What your requests look like (do they include the proper cookies?)
  * I'd guess you need FOLLOWLOCATION.
  * What the response-headers look like.

  --
   Daniel Stenberg -- curl, cURL, Curl, CURL. Groks URLs.

  -------------------------------------------------------
  This sf.net email is sponsored by:ThinkGeek
  Welcome to geek heaven.
  http://thinkgeek.com/sf

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Received on 2003-02-17