Merhaba arkadaşlar hotfile ye curl ile login olmaya çalışıyorum.
<?php
$id = "plyhard13";
$pw = "hugble13";
$postfields = "user=$id&pass=$pw&returnto=/";
/*
$ch = curl_init();
curl_setopt($ch, CURLOPT_HEADER, 1); // Get the header
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); // Allow redirection
curl_setopt ($ch, CURLOPT_COOKIEJAR, 'c:\cookie.txt');
curl_setopt($ch, CURLOPT_URL, "http://hotfile.com/premium.html");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "$postfields");
<?php*/
echo $postfields;
echo dirname(__FILE__);
$ch = curl_init();
touch("./cookie.txt");
curl_setopt ($ch, CURLOPT_URL, 'http://hotfile.com/');
curl_setopt ($ch, CURLOPT_POST, 1);
curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt ($ch, CURLOPT_POSTFIELDS, "user=$id&pass=$pw&returnto=/");
curl_setopt($ch, CURLOPT_COOKIEFILE, dirname(__FILE__) . "/cookies.txt");
curl_setopt($ch, CURLOPT_COOKIEJAR, dirname(__FILE__) . "/cookies.txt");
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
echo curl_exec($ch);
curl_close($ch);
?>çalıştırdığımda ekrana user=$id&pass=$pw&returnto=xxxx diye basıyor + login olmuyor ve cookie dosyalarına bişey yazmıyor (chmod lar doğru...)