Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1

    cURL with cookies

    What I want to happen is I want via cURL to open a URL and post values, and allow it to set a cookie (and store in a cookie jar) , then with that cookie it calls upon another URL on the same site using those cookies, and post another value to another part of the site , then echos the response (the result) , then dumps the cookies.

  • #2
    Master Coder
    Join Date
    Jun 2003
    Cottage Grove, Minnesota
    Thanked 1,096 Times in 1,087 Posts
    I don't really have an example script to show, but would like to mention this...

    You'll need to use two scripts.

    One script is used for writing the cookie(s), the other script for displaying results.

    The reason is that you can't write a cookie and display the results in the same
    instance of a script ... meaning, you need one refresh to write the cookie, as it's
    sent in a header. By using a separate script for writing that cookie, when it is
    redirected back, you have the header you need.

    just thought that might give you some ideas.


    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts