• 07-11-2010, 17:25:12
    #1
    Kimlik doğrulama veya yönetimden onay bekliyor.
    internette çeşitli kodlar buldum facebook a giriş için, giriş yapıyorum ancak bi süre sonra login.php ye yönlendiriyo. Bu sorunu nasıl çözebiliriz?
  • 07-11-2010, 17:34:24
    #2
    Üyeliği durduruldu
        $cookie_file_path = "cookie.txt";  
        $fp = fopen($cookie_file_path);    
        fclose($fp);
        $agent = "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7";
        $reffer = "http://www.facebook.com/login.php";
        $kullaniciadin = "buraya";
        $sifren        = "oda buraya";
            $ch = curl_init();
            curl_setopt($ch, CURLOPT_URL,"https://login.facebook.com/login.php");    
            curl_setopt($ch, CURLOPT_USERAGENT, $agent);
            curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file_path);
            curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file_path);
            curl_setopt($ch, CURLOPT_REFERER, "http://www.facebook.com/login.php");
            curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
            curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
            curl_setopt($ch, CURLOPT_HEADER, 1);
            curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
            curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
            curl_setopt($ch, CURLOPT_POSTFIELDS, "charset_test=%E2%82%AC%2C%C2%B4%2C%E2%82%AC%2C%C2%B4%2C%E6%B0%B4%2C%D0%94%2C%D0%84&version=1.0&return_session=0&charset_test=%E2%82%AC%2C%C2%B4%2C%E2%82%AC%2C%C2%B4%2C%E6%B0%B4%2C%D0%94%2C%D0%84&email=".$kullaniciadin."&pass=".$sifren."");
              $html = curl_exec($ch);
              echo $html;
    cookie.txt Oluşturmayı Unutma
    $kullaniciadin = "buraya";
    $sifren = "oda buraya";

    Bide Bunlar.
    Açıklama : Sürekli bağlı kalmak istiyorsun giriş sağlandıktan sonra ajax yardımı ile yada frame yardımı ile sayfanın belli bir alanında facebookun ufak bir sayfasını dakkada bir yenilet.

    Kolay Gelsin.
  • 07-11-2010, 17:46:20
    #3
    teşekkür ederim cevabınız için. şimdi login olduk diyelim sonra verdiğim linkle girip $html i şu şekilde yazdırmak istiyorum. sayfalarda cookie yi nasıl isteyeceğiz.

    $filename = "$url.txt"; 
    $fp = fopen ($filename, "a");
    fwrite($fp, $html);
    fclose($fp);
  • 07-11-2010, 17:48:12
    #4
    zaten sayfa db den link çekecek sürekli ve onların hepsine tek tek girecek ondan en geç 1.5-2 dk da bir yenliecek.