- Katılım
- 12 Kasım 2017
- Mesajlar
- 2
- Reaction score
- 0
Arkadaşlar Online Sayacıma Bunları Eklemek İstiyorum
--------------------------------------------------------------
Bugun Çoğul
Tarayıcınız
İşletim Sisteminiz
Toplam Çoğul
Sayaç Kodu
--------------------------------------------------------------
Bugun Çoğul
Tarayıcınız
İşletim Sisteminiz
Toplam Çoğul
Sayaç Kodu
PHP:
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();
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>";