Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.

cURL headers/cookies


ranma's Avatar
Member
0 0

I am working on a webpage to get info from the website of a game. No, not a bot. This is how it is: There is an attack log that logs who gets attacked. However, it only logs 20 attacks. I want to make a webpage that logs all of them and stores them in a database. The parsing and putting in the database are all really easy. What I need help with is getting the page with cURL. I will need to send my cookies. How can I send cookies?


ghost's Avatar
0 0

Use CURLOPT_HTTPHEADER. Something like this:

markupcurl_setopt( $ch, CURLOPT_HTTPHEADER, "Cookie: varName=value; anotherVar=value" );


korg's Avatar
Admin from hell
0 0

I would use: markupcurl_setopt ($ch, CURLOPT_COOKIE, "Cookie info here");


ranma's Avatar
Member
0 0

Thanks. Now I need to get the response headers. How would I do that? EDIT: Got that. How do I send my own headers?