I am using curl to retrieve cookies like so:
curl -c cookies.txt url
then I parse the cookie I want from the cookies.txt file and send the
if you have Firebug installed on Firefox, just open the url. In the network panel, right-click and select Copy as cURL. You can see all curl parameters for this web call.