• 10-11-2017, 21:40:10
    #1
    Kimlik doğrulama veya yönetimden onay bekliyor.
    Merhaba ArkadaşLar Benim Halledemediğim Bir Konu Var Web Sitemde Online Sayaç Var Ve bu Sayaç Gece 00:00 Sıfırlama Yapacak Yerine Sabah 08:00 De yapıyor Ve Çözemedim Sorunu Yardımcı oLursanız Sevinirim

    Web Site: https://www.eniyisozler.net/ Sayaç Sağ Sidebar'da

    Sayaç Kodu:
    echo " 
        <table border='1' width='240' height='170' id='table1' bordercolor='#3399FF' bgcolor='#FFFFFF' > 
            <tr> 
                <td width='16' align='center' height='20'> 
                <img border='0' src='img/on.gif' width='16' height='16'></td> 
                <td width='75' height='20'> 
                <font face='Tahoma' color='#FF0000'><span style='font-size: 9pt'>Online Ziyaretçi</span></font></td> 
                <td width='67' height='20'> 
                <font face='Tahoma' style='font-size: 10pt' color='#FF0000'>" ;  
    #---Aktif Ziyaretçi Sayısı-------------------------------------------------------------------- 
    $ip = $_SERVER['REMOTE_ADDR'];  
    $past = time()-150;  
    mysql_query("DELETE FROM online WHERE time < $past");  
    $result = mysql_query("SELECT time FROM online WHERE ip='$ip'");  
    $time = time();  
    if($row = mysql_fetch_array($result)){  
    mysql_query("UPDATE online SET time='$time',ip='$ip' WHERE ip='$ip'"); 
    }else{  
    mysql_query("INSERT INTO online (ip,time) VALUES ('$ip','$time')") or die(mysql_error());  
    }  
    $result   = mysql_query("SELECT ip FROM online");  
    $aktifkac = mysql_num_rows($result); 
    echo $aktifkac;      
    #---Aktif Ziyaretçi Sayısı--------------------------------------------------------------------             
                echo "</font></td> 
            </tr> 
            <tr> 
                <td width='16' align='center' height='20'> 
                <img border='0' src='img/user.gif' width='16' height='16'></td> 
                <td width='75' height='20'> 
                <font face='Tahoma' style='font-size: 8pt'>Bugün Tekil</font></td> 
                <td width='67' height='20'> 
                <font face='Tahoma' style='font-size: 9pt' color='#003366'>";  
    #---Bugün Tekil Toplam Kaç Kişi Girmiş--------------------------------------------------------             
    $bugun = date("Y-m-d"); 
    $sorgu = mysql_query("select tarih from ziyaret where tarih='$bugun'"); 
    $bugunku = mysql_num_rows($sorgu); 
    echo $bugunku;              
    #---Bugün Tekil Toplam Kaç Kişi Girmiş--------------------------------------------------------         
                echo "</font></td> 
            </tr> 
            <tr> 
                <td width='16' align='center' height='20'> 
                <img border='0' src='img/user.gif' width='16' height='16'></td> 
                <td width='75' height='20'> 
                <font face='Tahoma' style='font-size: 8pt'>Dün Tekil</font></td> 
                <td width='67' height='20'> 
                <font face='Tahoma' style='font-size: 9pt' color='#003366'>";  
    #---Dün Tekil Toplam Kaç Kişi Girmiş---------------------------------------------------------- 
    $baslat  =date(Y."-".m."-".d); 
    $year    =substr($baslat, 0,4); 
    $month   =substr($baslat, 5, 2); 
    $day     =substr($baslat, 8, 2); 
    $bitis   =date("Y-m-d", mktime(0, 0, 0, $month, $day-1, $year)); 
    $sorgula = mysql_query("select tarih from ziyaret where tarih='$bitis'");     
    $dunku = mysql_num_rows($sorgula); 
    echo $dunku; 
    #---Dün Tekil Toplam Kaç Kişi Girmiş----------------------------------------------------------         
                echo "</font></td> 
            </tr> 
            <tr> 
                <td width='16' align='center' height='20'> 
                <img border='0' src='img/users.gif' width='16' height='16'></td> 
                <td width='75' height='20'> 
                <font face='Tahoma' style='font-size: 8pt'>Toplam Tekil</font></td> 
                <td width='67' height='20'> 
                <font face='Tahoma' style='font-size: 9pt' color='#003366'>";  
    #---Toplam Tekil Kaç Kişi Girmiş--------------------------------------------------------------             
    $ipsi  = $_SERVER['REMOTE_ADDR']; 
    $tarih = date("Y-m-d"); 
    $ipkontrol = mysql_query("select * from ziyaret where ip='$ipsi' order by id desc"); 
    $yaz   = mysql_fetch_assoc($ipkontrol); 
    $vip   = $yaz['ip']; 
    $vtarih= $yaz['tarih']; 
    $bak = mysql_num_rows($ipkontrol); 
    if($bak>0){  //if- 
        if($vtarih<$tarih){ 
        $kayit_1 = mysql_query("insert into ziyaret (ip,tarih) values ('$ipsi','$tarih')"); 
        }  
    }//if- 
    else{ 
    $kayit_2 = mysql_query("insert into ziyaret (ip,tarih) values ('$ipsi','$tarih')"); 
    } 
    $toplamne = mysql_query("select * from ziyaret"); 
    $toplamziyaret  = mysql_num_rows($toplamne); 
    echo $toplamziyaret;             
    #---Toplam Tekil Kaç Kişi Girmiş--------------------------------------------------------------             
                echo "</font></td> 
            </tr>                         
            <tr> 
                <td width='16' align='center' height='20'> 
                <img border='0' src='img/ip.gif' width='16' height='16'></td> 
                <td width='142' colspan='2' height='20'> 
                <font face='Tahoma' style='font-size: 8pt'>IP Adresiniz: </font> 
                <font face='Tahoma' style='font-size: 9pt'> [ </font> 
                <font face='Tahoma' style='font-size: 9pt' color='#FF0000'> $ipsi </font> 
                <font face='Tahoma' style='font-size: 9pt'> ] </font></td> 
            </tr>                         
        </table> 
    </div>";
  • 12-11-2017, 09:12:28
    #2
    Sunucunun saatini türkiye saatine göre ayarlarsan sorun ortadan kalkacaktır
  • 12-11-2017, 16:08:19
    #3
    susmus adlı üyeden alıntı: mesajı görüntüle
    Sunucunun saatini türkiye saatine göre ayarlarsan sorun ortadan kalkacaktır
    Sunucu Saatini NasıL Değişebilirim Bunu Bağlantı Veren Shell Değişmesi qerekmiyormu
  • 13-11-2017, 11:48:14
    #4
    hosting aldığınız yerden yardım isteyebilirsiniz.
  • 13-11-2017, 15:03:48
    #5
    date_default_timezone_set('Europe/Istanbul');
    bu satırı ekleyip deneyebilirsiniz.
  • 13-11-2017, 19:03:16
    #6
    KALICI adlı üyeden alıntı: mesajı görüntüle
    date_default_timezone_set('Europe/Istanbul');
    bu satırı ekleyip deneyebilirsiniz.
    sayac.php içinemi ekliyeyim bu kodu ?
  • 13-11-2017, 22:36:05
    #7
    Eniyisozler adlı üyeden alıntı: mesajı görüntüle
    sayac.php içinemi ekliyeyim bu kodu ?
    Evet en baÅŸa ekleyin.
  • 14-11-2017, 00:12:11
    #8
    echo" kodundan sonrami öncemi
  • 14-11-2017, 00:37:15
    #9
    Eniyisozler adlı üyeden alıntı: mesajı görüntüle
    echo" kodundan sonrami öncemi
    En üste yeni bir satıra
    <?php
    den hemen sonra.