im actually have a little issue with the cookie.
when i first run the script a cookie is created with session-id-time and session-id
then the script is done and amazon says cookies isn't enabled, then i refresh and run the script again and then amazon adds another 3 cookie values and then lets me log in.
is this something i can sort out in php? or does it seem to be amazon login specific?
$url = "https://affiliate-program.amazon.com/gp/flex/sign-in/select.html";
$ch = curl_init();
curl_setopt ($ch, CURLOPT_COOKIEFILE, '/mounted-storage/home..../cookie.txt');
curl_setopt ($ch, CURLOPT_COOKIEJAR, '/mounted-storage/home..../cookie.txt');
curl_setopt ($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt ($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6");
curl_setopt ($ch, CURLOPT_TIMEOUT, 60);
curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 0);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt ($ch, CURLOPT_REFERER, $url);
curl_setopt ($ch, CURLOPT_POSTFIELDS, 'action=sign-in&email='.$username.'&password='.$password);
curl_setopt ($ch, CURLOPT_POST, true);
$result = curl_exec ($ch);
print_r($result);
curl_close($ch);