Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Mar 2008
    Posts
    61
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Getting curl to save cookies

    What i need done is have curl post userID=john&password=abc123 , and any cookies that is set after that information is posted, then save them to cookie.txt

  • #2
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,502
    Thanks
    8
    Thanked 1,089 Times in 1,080 Posts
    I assume you're using CURL because you want to post to another server?

    Here is a good explanation of that part:
    http://davidwalsh.name/execute-http-post-php-curl

    If you're posting the form (username/password) to the same server,
    Then I'm not sure why you're using CURL.

    I think we need to know more before answering the cookie part, because
    I'm not sure if cookies are the correct thing ... maybe PHP SESSION?
    Or is there a MySQL database involved with the username/password?
    How do you determine if the username and password is correct?


  •  

    Posting Permissions

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