rgb192
asked on
use curl to go to page3 (if cookie is set)
this question is a followup to
https://www.experts-exchange.com/questions/28019735/example-to-test-curl.html
which sets a cookie and logs onto a post form
using curl
takes user from page1 to page2
how can there be an curl example, if cookie is set then go to page
maybe page3 or page4 which are not linked to the page1 logon but are linked to the cookie
https://www.experts-exchange.com/questions/28019735/example-to-test-curl.html
which sets a cookie and logs onto a post form
using curl
takes user from page1 to page2
how can there be an curl example, if cookie is set then go to page
maybe page3 or page4 which are not linked to the page1 logon but are linked to the cookie
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Good clarification Ray :) The main point that I wanted to clarify is that the request is NOT made by the visitor browser client, of course the request can contain any header.
Indeed it can - absolutely any header including a completely bogus referer, browser details, etc.
ASKER
okay I am reading a basic explanation of the way the code should work
thanks
thanks
It is true that cURL scripts are run on a server, but in the cURL application, the server that makes the request becomes the client in the HTTP client/server model. The rules still apply: Every request (whether GET or POST) is atomic, complete and stateless, and the server's response is complete and usually instantaneous. Then the server disconnects and waits for the next action from a client, effectively "forgetting" everything about the previous request. In the HTTP client/server model, the server cannot initiate any action on the client machine. The server can only respond to requests.