• 05-10-2007, 00:54:38
    #1
    Merhaba arkadaşlar;

    Bir site var, login.asp kısmında 2 tane input kısmı var username ve password isimleri PHP'de curl kullanarak bu siteye login olmak istiyorum bir türlü yapamadım yaptıklarımdada yönlendirmiyor (Aynı sayfada login.asp çıkıyor ve resimler filan yok) Ben istiyorum login olup siteye yönlendirsin.

    Nasıl yapabilirim?
  • 05-10-2007, 17:04:35
    #2
    Sorunumu bilen yokmu :'(
  • 05-10-2007, 19:45:19
    #3
    Curl Php İçindir ... Ve Gerek Yoktur



    normalde <form action="login.asp" method="post"> olan kısmı

    <form action="http://girileceksite/login.asp" method="post">

    Yaptığında istediğin Siteye Login Bilgileri Postlarsın
  • 05-10-2007, 22:10:13
    #4
    Alakası yok. CURL'ü php ile çalışrabilirsiniz sadece istediğiniz siteye login olabilirsin.

    Arkadaşın işi sadece login oldukdan sonra değil sanırım login oldukdan sonra bilgi almak istiyo. CURL kodu şu arkadaşım.

    <?php
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, 'http://www.hebe.com/login.asp');
    
    curl_setopt ($ch, CURLOPT_POST, 1);
    
    curl_setopt ($ch, CURLOPT_POSTFIELDS, 'fieldname1=fieldvalue1&fieldname2=fieldvalue2');
    
    curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
    
    $store = curl_exec ($ch);
    
    curl_setopt($ch, CURLOPT_URL, 'http://www.hebele.com/zr.rar');
    
    $content = curl_exec ($ch);
    
    curl_close ($ch); 
    
    ?>
    Burda login olup bi dosyayı download ettirdik
  • 06-10-2007, 20:05:03
    #5
    tribles hocam öncelikle yardımın için tşk ederim ancak bu kod çalışmadı istediğim tam olarak şu; kullanıcı adım ve şifremle siteye login olup, loginolmakistedigimsite.com/index.asp sine login olmuş bir şekilde yönlendirmek. Yani kullanıcı adı ve şifre girmeden php yi çalıştırdığım gibi login olup siteye girsin bu kodu çalıştırdım sonra loginolmakistedigimsite.com/index.asp adresini aynı pencereye kopyalıyıp denedim ama login olmadı, bunu nasıl yapabilirim?
  • 06-10-2007, 20:40:34
    #6
    benim söylediğim şekilde yaparsın

    login form u buraya yazar mısın ve girmek istediğin siteyi yapalım
  • 06-10-2007, 20:55:55
    #7
    Üyeliği durduruldu
    Şimdi burda siteye girecek php mi sen misin ?
    onu anlat bize yani php login olup index.asp'ye gidip ordaki verilerle
    işlemmi yapacak yoksa php senin yerine login olup seni index.asp'ye yönlendirecek mi
    yani login olmuş bi şekilde ? buraya bi açıklık getirelim
  • 07-10-2007, 19:19:43
    #8
    Şimdi hocam ASP bir site var bunun üyelik girişi yapıldığı "login.asp" kısmı var iki tanede input kısmı var.
    1.input name: username
    2.input name: password

    Ben istiyorumki "kendisitem.com/curl.php" adresine girdiğim zaman, login.asp ye username ve password bilgilerini gönderip login olsun ve siteye yönlendirsin.

    İşin özü siteye gir=> kullanıcı adı ve şifre girip oturum açmak istemiyorum. "kendisitem.com/curl.php" şunu çalıştırdığımda siteye login olup ve yönlendirsin.

    PHP benim yerime login olup, siteye yönlendirmesini istiyorum.

    Umarım anlatabilmişimdir.
    Yardımlarınız için tşk ederim.
  • 07-10-2007, 19:28:12
    #9
    Üyeliği durduruldu
    zamanında şöyle bişeyler bulmuştum godaddy e login olmak için 3 ayrı yol

    function google_login1($user,$pass) {
    $url="https://idp.godaddy.com/login.aspx?se=%2B&spkey=GDSWEB50&ci=708&target=default%2Easp";
    $post="UsernameTextBox=$user&PasswordTextBox=$pass&LoginImageButton.x=56&LoginImageButton.y=13&EmailEnter=+Free+Email+Updates%21+Enter+address+&EmailSub=";
    $curl = curl_init();
    curl_setopt($curl,CURLOPT_URL, $url);
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($curl,CURLOPT_POSTFIELDS, $post);
    curl_setopt($curl, CURLOPT_USERAGENT,
    $_SERVER['HTTP_USER_AGENT']);
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
    curl_setopt($curl,CURLOPT_VERBOSE ,1 );
    curl_setopt($curl,CURLOPT_HEADER ,1 );
    curl_setopt($curl,CURLOPT_FOLLOWLOCATION, 1);
    $result = curl_exec($curl);
    curl_close($curl);
    return $result;
    }
    
    function godaddy_login2($user,$pass) {
    $curl=curl_init();
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
    curl_setopt($curl, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
    curl_setopt($curl,CURLOPT_URL,"https://idp.godaddy.com/login.aspx?se=%2B&spkey=GDSWEB04&login=&target=secure%5Ftransfer%2Easp%3Furl%3D");
    curl_setopt($curl,CURLOPT_RETURNTRANSFER ,1 );
    curl_setopt($curl,CURLOPT_VERBOSE ,1 );
    curl_setopt($curl,CURLOPT_HEADER ,1 );
    curl_setopt($curl,CURLOPT_FOLLOWLOCATION, 1);
    curl_setopt($curl,CURLOPT_COOKIEJAR, "cookie.txt");
    curl_setopt($curl,CURLOPT_COOKIEFILE, "cookie.txt");
    $result="Page 1:<br>".curl_exec($curl);
    curl_setopt($curl,CURLOPT_URL,"https://idp.godaddy.com/login.aspx?se=%2B&spkey=GDSWEB04&login=&target=secure%5Ftransfer%2Easp%3Furl%3D");
    curl_setopt($curl,CURLOPT_POST ,1);
    curl_setopt($curl,CURLOPT_REFERER,"http://www.godaddy.com/gdshop/default.asp"
    );
    curl_setopt($curl,CURLOPT_POSTFIELDS,"UsernameTextBox=$user&PasswordTextBox=$pass");
    $result.="Page 2:<br>".curl_exec($curl);
    return $result;
    }
    
    function godaddy_login3($user,$pass) {
    $url="https://idp.godaddy.com/login.aspx?se=%2B&spkey=GDSWEB91&login=&target=secure%5Ftransfer%2Easp";
    $vars="UsernameTextBox=$user&PasswordTextBox=$pass";
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_HEADER, 1);
    curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookie.txt');
    curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookie.txt');
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $vars);
    $result = curl_exec($ch);
    curl_close($ch);
    return $result;
    }

    umarım yardımcı olur.