If you read through this post carefully, there is a bonus at the last sentence 🙂

I am encountering a problem which, if you know more than I do, should be easy to trace. I am trying to emulate a login using curl. I have been able to do it successfully on my own websites, but when there is a digital cert involved, I think there is a problem.

Go here:
http://hmr.fantasticshop.com/gf5/console/browser2.php
and enter

pinterest.com/login

in the field right after the http : //

You will see a redirect below, and next to Location: you'll see a link to [Go here] - click on this

this will requery the browser emulator with that location.

HOWEVER:
1. I get a status of 302 FOUND (which I'm not familiar with)
2. Again the response is a Location: header, but the location is the same URL!

I am suspecting that the cURL post needs to pass the certificate as well. I have done some studying on this but can use your advice/suggestion here.
If you have or download the Firefox plug-in "Live HTTP Headers" version 0.17, and then monitor requesting http://pinterest.com/login, you can see that there are several http requests and responses including to a third party CA. Hopefully I can skip this and it's not that complicated.

I am hoping there is an easy answer on this. Notice from the cURL line print-out on my browser emulator, that I use a common file to send and receive cookies and that works just fine keeping the session. Again, I was able to login OK and have a session "stick" on some websites I have developed.

Thanks,
Sam

Last sentence bonus: I'd be happy to share the code I have so far on this "browser emulator" thing, it is really helping me learn how to structure queries.

    good comment, and you are right, however i just forgot to ask folks to use the process. Here's a shortcut URL to see this:

    http://hmr.fantasticshop.com/gf5/console/browser2.php?protocol=http%3A%2F%2F&url=pinterest.com%2Flogin%2F&post=1

    in THIS CASE, I've hit the bottom of the line because the Location: is the same as this character for character. Refreshing the page repeatedly, gives the same response headers exc. for the date/time.

    BTW on the ETag, d41d8cd98f00b204e9800998ecf8427e is md5() for "blank" which makes sense.

    Again, I'm thinking the cert data is missing

      d'OH! sorry about that. Here is the correct link:

      http://hmr.fantasticshop.com/gf5/console/browser2.php?protocol=https%3A%2F%2F&url=pinterest.com%2Flogin%2F&post=1

      I had failed to update the protocol to https.

      Hope you enjoy the emulator thingy Brad, I designed it for this specific issue. NOW, theoretically I can post by adding this in the data box:

      email=somebody@aol.com
      password=supersecrit

      and any other name/value pairs the form would request.

      Thanks for your replies

        Write a Reply...