Below is a sample of my code. I need to send a field in the header named "Cookie" and it's value should be what i have in the $cookie variable.
Any chance someone could tell me the correct syntax in the array to include the variable in there?
$headers = array(
"Cookie:" .$cookie
);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
For example,
First time i "hit" the server i get back
Cookie:JSESSIONID=280FC268DDBA4260AB7F9A5C67304C5C
If i then send it back to the server like this
$headers = array(
"Cookie:JSESSIONID=280FC268DDBA4260AB7F9A5C67304C5C",
);
It won't respond with a new cookie. But it won't seem to work when i pass it as an variable.