Hi, i want to login on yahoo with php cURL, i made a script but i can't make it work fine (it gives me blank page). Please tell me how can i fix it. Thanks
<?php $username = "user"; $password = "pass"; $ch = curl_init(); curl_setopt ($ch, CURLOPT_URL, 'http://login.yahoo.com/config/login?'); curl_setopt ($ch, CURLOPT_POST, 1); curl_setopt ($ch, CURLOPT_POSTFIELDS, "login=$username&passwd=$password&.src=&.tries=5&.bypass=&.partner=&.md5=&.hash=&.intl=us&.tries=1&.challenge=ydKtXwwZarNeRMeAufKa56.oJqaO&.u=dmvmk8p231bpr&.yplus=&.emailCode=&pkg=&stepid=&.ev=&hasMsgr=0&.v=0&.chkP=N&.last=&.done="); curl_setopt ($ch, CURLOPT_COOKIEJAR, "cookies.txt"); curl_setopt ($ch, CURLOPT_COOKIEFILE, "cookies.txt"); curl_setopt ($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Macintosh; U; PPC Mac OS X;en) AppleWebKit/419.2.1 (KHTML, like Gecko) Safari/419.3'); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); $result=curl_exec ($ch); curl_close ($ch); echo $result;