<?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...)
Curl ile login olma
8
●1.629
- 20-03-2010, 22:55:09Merhaba arkadaşlar hotfile ye curl ile login olmaya çalışıyorum.
- 20-03-2010, 23:23:24bu sefer ekrana sadecInvictus adlı üyeden alıntı: mesajı görüntüle
user=plyhard13&pass=hugble13&returnto=//var/www/vhosts/r10blog.com/httpdocs
bastı - 21-03-2010, 00:11:08inforesim adlı üyeden alıntı: mesajı görüntüle
http://admin.hotfile.com/login.php
olarak dene ve cookie => 777 unutma. - 21-03-2010, 15:01:29bilmediğim için soruyorum, hotfile login olunduğunda cookie yolluyor mu yoksa sadece session ile mi kontrol ediyor login olunup olunmadığını? eğer sadece session kullanıyorlarsa bunu yaptıktan sonra login olmuşsun, yapmak istediğin ne varsa yapmaya devam edersin.
bir de post falan atmadan sadece hotfile.com a bağlanıp çıktısını alsana, belki browser bilgisi boş olduğu için izin vermiyordur. - 13-03-2017, 15:29:38sene 2016 konuyu hortlattığımın farkındayım. ama şuan başıma geldi ve şu şekilde çözdüm.
curl_setopt($ch, CURLOPT_COOKIEJAR, realpath("c.txt"));
curl_setopt($ch, CURLOPT_COOKIEFILE, realpath("c.txt"));