Tekil Mesaj gösterimi
Alt 17 Mart 2010, 13:16   #2
Çevrimdışı
toXic
Kullanıcıların profil bilgileri misafirlere kapatılmıştır.
IF Ticaret Sayısı: (0)
IF Ticaret Yüzdesi:(%)
Cevap: Master Arkadaşların Dikkatine ( Yardım )




hmm sanirim kod eksik..


PHP Kod:   Kodu kopyalamak için üzerine çift tıklayın!
<?php 
//Put your basic server info here
$server "localhost"//normally localhost
$db_user "username"//your MySQL database username
$db_pass "password"//your MySQL database password
$database "users"
$timeoutseconds 300
 
//this is where PHP gets the time
$timestamp time(); 
$timeout $timestamp-$timeoutseconds
 
//connect to database
//$server = localhost probably
//$db_user = your MySQL database username
//$db_pass = //your MySQL database password
mysql_connect($server$db_user$db_pass); 
 
//insert the values
$insert mysql_db_query($database"INSERT INTO useronline VALUES
('
$timestamp','$REMOTE_ADDR','$PHP_SELF')"); 
if(!(
$insert)) { 
print 
"Useronline Insert Failed > "

 
//delete values when they leave
$delete mysql_db_query($database"DELETE FROM useronline WHERE timestamp<$timeout"); 
if(!(
$delete)) { 
print 
"Useronline Delete Failed > "

 
//grab the results
$result mysql_db_query($database"SELECT DISTINCT ip FROM useronline WHERE file='$PHP_SELF'"); 
if(!(
$result)) { 
print 
"Useronline Select Error > "

 
//number of rows = the number of people online
$user mysql_num_rows($result); 
 
 
//spit out the results
mysql_close(); 
if(
$user == 1) { 
print(
"$user user online\n"); 
} else { 
print(
"$user users online\n"); 

?>

Bu sekil denedinizmi kodlar değiştirilmiş:S


Konu toXic tarafından (17 Mart 2010 Saat 13:34 ) değiştirilmiştir.
 
Alıntı ile Cevapla

IRCForumlari.NET Reklamlar
sohbet odaları reklam ver Benimmekan Mobil Sohbet