extract cookie from http header cURL