Support MemHT, Vote Now!
MemHT Portal is a Free PHP CMS and Blog
It permit the creation and the management online of websites with few and easy steps.
It's completelly customizable, expandable and suitable for all needs.
     Site demo
Moderators: mem paulo89 adminik
Page 3/3 |< < 1 2 3
RSSReply
ciao mem mi potresti aiutare
AuthorText
mem
MemHT's Dad
Admin / Developer

Avatar

Posts: 3780
Contributes: 1052

Gender: _MALE_
Online: No

Languages: English, Italiano, Makedonski, Srpski, Un poco de Español
Date: 23/09/2007 21:52
ciao mem mi potresti aiutare
#post1822
quando vedi la struttura della tabella, premi sull'icona unique corrispondente al valore ip
Image
MemHT Portal - Free PHP CMS and Blog

"Great works are performed, not by strength, but by perseverance."
Samuel Johnson

READ THIS before posting your support question in the forum!
Delete Edit Quote
 
rocco.mo
Junior Member
Avatar

Posts: 80
Contributes: 4

Gender: _NEUTRAL_
Online: No
Date: 23/09/2007 22:01
ciao mem mi potresti aiutare
#post1823
si l ho fatto ara va grazie infinite ti vorrei chiedere tu hai qualche script per la reg utente
Delete Edit Quote
 
mem
MemHT's Dad
Admin / Developer

Avatar

Posts: 3780
Contributes: 1052

Gender: _MALE_
Online: No

Languages: English, Italiano, Makedonski, Srpski, Un poco de Español
Date: 23/09/2007 22:06
ciao mem mi potresti aiutare
#post1824
è quasi 1 anno che programmo solo per il cms, non ho script standalone
Image
MemHT Portal - Free PHP CMS and Blog

"Great works are performed, not by strength, but by perseverance."
Samuel Johnson

READ THIS before posting your support question in the forum!
Delete Edit Quote
 
rocco.mo
Junior Member
Avatar

Posts: 80
Contributes: 4

Gender: _NEUTRAL_
Online: No
Date: 23/09/2007 22:19
ciao mem mi potresti aiutare
#post1825
ne ho trovati ma non funzionano
Delete Edit Quote
 
rocco.mo
Junior Member
Avatar

Posts: 80
Contributes: 4

Gender: _NEUTRAL_
Online: No
Date: 24/09/2007 17:39
Re: ciao mem mi potresti aiutare
#post1842
ciao mem ti volevo domandare lo script che mi hai postato perche secondo te l ho provato online e mi da due persone che sono attualmente nel sito secondo te perche so di sicuro che sono solo io nel sito perche le prove le faccio in una sotto cartella ti posto il codice dagli perfavore un occhiata agari ho fatto qualche errore
code


<?php

/*
tabella 'useronline'
--------------------
campi:  time (datetime)
                ip (varchar 15 unique)
                url (varchar 255)
*/


$dbhost = "localhost";
$dbuser = "root";
$dbpass = "";
$dbname = "3333";
$timeoutseconds = 300;

if (getenv("HTTP_CLIENT_IP")) {
        $ip = getenv("HTTP_CLIENT_IP");
} else if (getenv("HTTP_X_FORWARDED_FOR")) {
        $ip = getenv('HTTP_X_FORWARDED_FOR');
} else if (getenv('REMOTE_ADDR')) {
        $ip = getenv('REMOTE_ADDR');
} else {
        $ip = "Unknown";
}

//Mi connetto al database
$db = @mysql_connect($dbhost,$dbuser,$dbpass)
        or die("&error=<b>Database error:</b> Cannot establish connection.");

//Seleziono il database
@mysql_select_db($dbname,$db)
        or die("&error=<b>Database error:</b> Cannot select database.");

//Cancello i "vecchi" visitatori
@mysql_query("DELETE FROM useronline WHERE (time + INTERVAL 5 MINUTE) < NOW()")
        or die("&error=<b>Database error:</b> Cannot insert new data.");

//Inserisco nuovi visitatori
@mysql_query("REPLACE INTO useronline (time,ip,url) VALUES (NOW(),'$ip','".$_SERVER['PHP_SELF']."')")
        or die("&error=<b>Database error:</b> Cannot insert new data.");

$result = mysql_query("SELECT time,ip,url FROM useronline ORDER BY time DESC");
while ($row = mysql_fetch_assoc($result)) {
        echo "&adress=".$row['ip']."&tempo=".$row['time'];
       
       
}
echo "&usersOnLine=".mysql_num_rows(mysql_query("SELECT ip FROM useronline"));




?>


 
Edited: 25/09/2007 12:07
Delete Edit Quote
 
Reply
Page 3/3 |< < 1 2 3
Tags Cloud
Advertising
News Archive
Language
Help MemHT Portal
Navigator
Search
Users Block
Hi Guest
IP: 38.103.63.60

Username
Password
New files
MemHT Wiki
Friends
MemHT Portal is a free software released under the GNU/GPL License by Miltenovik Manojlo