Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
Thread: cURL with cookies
02-25-2008, 10:51 PM #1TrainReqGuest
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.
02-26-2008, 01:52 PM #2
- Join Date
- Jun 2003
- Cottage Grove, Minnesota
- Thanked 1,089 Times in 1,080 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.