I am trying to get Session Value and store in the variable.. how can that be done?
Example:
curl_setopt($ch, CURLINFO_HEADER_OUT, true);
print_r(curl_getinfo($ch));
Output:
[request_header] => POST /customer.jsp?c=4 HTTP/1.1
Host: webdadasasd.co.uk
Accept: */*
Cookie: JSESSIONID=0000-dsfsdfsdf-sdfsdfsd_:fsdfsdfds
Content-Length: 54
Content-Type: application/x-www-form-urlencoded )
I want to get the Cookie value only like this: JSESSIONID=0000-dsfsdfsdf-sdfsdfsd_:fsdfsdfds
Use php’s http_parse_headers. (requires pecl_http)
If you don’t have/want pecl_http, you can find alternatives in discussion on that php manual page.