I am working on a script that automatically votes on the IGN Boards . I am having a problem with cookies. How do I make it include the cookie to make it assume I'm logged in?
Anyone?
This will store the cookie for you.
curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookie.txt'); curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookie.txt');
Okay, so in the cookie.txt file do I have to make the cookie or is it automatically set? SO say if I am logged in with IGN and I use my script to vote on a poll, will it make the cookie.txt file with the cookiejar command or do I have to have content inside it? thanks for the help!
Originally posted by Scoots Okay, so in the cookie.txt file do I have to make the cookie or is it automatically set? SO say if I am logged in with IGN and I use my script to vote on a poll, will it make the cookie.txt file with the cookiejar command or do I have to have content inside it? thanks for the help!
When curl gets a webbpage containing a cookie and also have a cookiejar to store it in, it will store the cookie and in the rest of the pages will send what is found in the cookiefile when it asks for a page. Think about curl as a browser, without cookiejar and cookiefile it got cookies turned off, with them specefied, it will have cookies turned on. Hope it helps.