command line cURL works but php one doesnt

Jireedips

New Member
The code:\[code\]// That works pretty wellcurl -d "user%5Blogin%5D=some%40email.pl&user%5Bpass%5D=testpass&user%5Bmemory%5D=on&user%5Bsubmit%5D=Login" -L -c cookie.txt http://turbobit.net/user/login//But this PHP code doesn't$headers = array('Content-Type' => 'application/x-www-form-urlencoded', 'Referer' => 'http://turbobit.net/'); $postdata = http://stackoverflow.com/questions/3570593/array('user%5Blogin%5D' => 'some%40email.pl', 'user%5Bpass%5D' => 'test', "user%5Bsubmit%5D" => 'Login', 'user%5Bmemory%5D' => 'on'); $cookie = "/srv/http/test/regexturbobit/cookie.txt"; $c = curl_init('http://tutbobit.net/user/login'); curl_setopt ($c, 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($c, CURLOPT_POST, 1); curl_setopt ($c, CURLOPT_RETURNTRANSFER, 1); curl_setopt($c, CURLOPT_FOLLOWLOCATION,1); curl_setopt($c, CURLOPT_POSTFIELDS, $postdata); curl_setopt ($c, CURLOPT_COOKIEJAR, $cookie); $output=curl_exec($c); curl_close($c); print_r($output);\[/code\]it just doesn't show anything and even dont save cookie...
 
Back
Top