• 20-03-2010, 22:55:09
    #1
    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...)
  • 20-03-2010, 23:12:55
    #2
    curl_setopt ($ch, CURLOPT_URL, 'http://hotfile.com/');
    olan kısmı

    curl_setopt ($ch, CURLOPT_URL, 'http://hotfile.com/login.php');
    olarak değiştir
  • 20-03-2010, 23:23:24
    #3
    Invictus adlı üyeden alıntı: mesajı görüntüle
    curl_setopt ($ch, CURLOPT_URL, 'http://hotfile.com/');
    olan kısmı

    curl_setopt ($ch, CURLOPT_URL, 'http://hotfile.com/login.php');
    olarak değiştir
    bu sefer ekrana sadec
    user=plyhard13&pass=hugble13&returnto=//var/www/vhosts/r10blog.com/httpdocs
    bastı
  • 20-03-2010, 23:33:20
    #4
    cookie dosyasına kayıt yapmadı mı?
  • 21-03-2010, 00:11:08
    #5
    inforesim adlı üyeden alıntı: mesajı görüntüle
    bu sefer ekrana sadec
    user=plyhard13&pass=hugble13&returnto=//var/www/vhosts/r10blog.com/httpdocs
    bastı
    http://admin.hotfile.com/login.php
    olarak dene ve cookie => 777 unutma.
  • 21-03-2010, 14:54:40
    #6
    Arkadaşlar kodlardamı sorun var anlamadım, Cookie dosyasına hiç bişey yazmıyor. Chmod larda 777 tam yani...
  • 21-03-2010, 15:01:29
    #7
    bilmediğ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.
  • 21-03-2010, 15:29:12
    #8
    k.adı ve şifreyi kodlardan kaldır istersen
  • 13-03-2017, 15:29:38
    #9
    sene 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"));