cookies - Syntax PHP cURL HTTP Header to include variable -
below sample of code. need send field in header named "cookie" , it's value should have in $cookie variable.
any chance tell me correct syntax in array include variable in there?
$headers = array( "cookie:" .$cookie ); curl_setopt($ch, curlopt_httpheader, $headers);
for example,
first time "hit" server back
cookie:jsessionid=280fc268ddba4260ab7f9a5c67304c5c
if send server
$headers = array( "cookie:jsessionid=280fc268ddba4260ab7f9a5c67304c5c", );
it won't respond new cookie. won't seem work when pass variable.
Comments
Post a Comment