dylan2xs
Nov 23 2006, 01:10 AM
| | Hi people, I am wondering If do you know a good "users online" I know many remote hosted services for this but I am looking for a counter script to install in my own website, If possible a counter that displays my visitors information , like country or an image(flag) links where they come from etc. something like this: Webpage I would SO appreciate any help! because I want to give to my site a more professional and international look
|
Reply
tractor
Nov 23 2006, 06:51 AM
I don't know of any. Maybe look at the source of that website? I really like the idea and if somone knows the answer i might use it too.
Reply
hts
Nov 23 2006, 02:35 PM
check out http://bbclone.deit`a free counter with quite complex statistics  ..just read on the site for details..
Reply
dylan2xs
Nov 26 2006, 04:55 AM
QUOTE(tractor @ Nov 23 2006, 06:51 AM)  I don't know of any. Maybe look at the source of that website? I really like the idea and if somone knows the answer i might use it too.
Unfortunately it's a remote hosted script, so looking the sourse of that web doesn't help much.. but I think they are making some changes to the counter and the map ..I prefered the previous version but they are using flash now... and some features have just gone..  or not working correctly ..at least not in my website
Reply
Saint_Michael
Dec 4 2006, 09:48 AM
Here are some useful counter scripts they are easy to put together. Basic Users online counter CODE <? $remote = $_SERVER["REMOTE_ADDR"]; $file = "usersonline.txt"; $timeoutseconds = 60; //Tells how long the user is considered "on line" $timestamp = time(); $timeout = ($timestamp-$timeoutseconds); $fp = fopen("$file", "a+"); $write = $remote."||".$timestamp."\n"; fwrite($fp, $write); fclose($fp); $online_array = array(); $file_array = file($file); foreach($file_array as $newdata){ list($ip, $time) = explode("||", $newdata); if($time >= $timeout){ array_push($online_array, $ip); } } $online_array = array_unique($online_array); $online = count($online_array); if($online == "1"){ echo "Users Online: $online"; }else{ echo "Users Online: $online"; } ?>
Display IP number CODE <?php echo $_SERVER["REMOTE_ADDR"]; ?>
Display browser CODE <?php echo $_SERVER["HTTP_USER_AGENT"]; ?>
To display a users time when they go to a website you can use one of these set ups. CODE <?php $today0 = date('D F d Y g:i a'); // Wed May 07 2003 1:21 am $today1 = date('F j, Y, g:i a'); // March 10, 2001, 5:16 pm $today2 = date('m.d.y'); // 03.10.01 $today3 = date('j, n, Y'); // 10, 3, 2001 $today4 = date('Ymd'); // 20010310 $today5 = date('h-i-s, j-m-y, it is w Day z'); // 05-16-17, 10-03-01, 1631 1618 6 Fripm01 $today6 = date('\i\t \i\s \t\h\e jS \d\a\y.'); // It is the 10th day. $today7 = date('D M j G:i:s T Y'); // Sat Mar 10 15:16:08 MST 2001 $today8 = date('H:m:s \m \i\s\ \m\o\n\t\h'); // 17:03:17 m is month $today9 = date('H:i:s'); // 17:16:17 echo "
$today1<BR> $today2<BR> $today3<BR> $today4<BR> $today5<BR> $today6<BR> $today7<BR> $today8<BR> $today9"; ?>
good place to check out some scripts are at pixel2life.com to get a good idea how to set them up and what not.
Reply
tajemranks
Jan 22 2007, 02:32 AM
wow...its good add on for my site script... thanks for share..
Reply
iGuest
Mar 29 2008, 11:55 PM
Replying to Saint_MichaelHow do I use that script -reply by marlon
Reply
sinisteredd
Apr 3 2008, 09:52 AM
I had the same problem as you, so i will share this script with you. It works great, so i hope you like it. In phpMyAdmin, click on your database then click on SQL at the top. Type this(see code below) in the box and click 'Go': CODE CREATE TABLE `useronline` (
`timestamp` int(15) NOT NULL default '0',
`ip` varchar(40) NOT NULL default '',
`file` varchar(100) NOT NULL default '',
PRIMARY KEY (`timestamp`),
KEY `ip` (`ip`),
KEY `file` (`file`)
) Now just copy this code where you want the stats to appear: *you could also save this as: online_users.php (or any name you want) and use: <?php include 'online_users.php'; ?> on the place you want the stat to appear*. CODE <?php //online users
$server = "YOUR HOST"; // usually localhost
$db_user = "USERNAME";
$db_pass = "PASSWORD";
$database = "DATABASE";
$timeoutseconds = 300; // length of gaps in the count
//get time
$timestamp = time();
$timeout = $timestamp-$timeoutseconds;
//connect to database
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 "";
}
//delete values when they leave
$delete = mysql_db_query($database, "DELETE FROM useronline WHERE timestamp<$timeout");
if(!($delete)) {
print "";
}
//grab the results
$result = mysql_db_query($database, "SELECT DISTINCT ip FROM useronline WHERE file='$PHP_SELF'");
if(!($result)) {
print "";
}
//number of rows = the number of people online
$user = mysql_num_rows($result);
if(!($user)) {
print("ERROR: " . mysql_error() . "\n");
}
//spit out the results
mysql_close();
print("$user");
?> I hope this is what you where looking for. Good luck
Reply
oestergaard
Apr 10 2008, 05:22 PM
QUOTE(Saint_Michael @ Dec 4 2006, 09:48 AM)  Here are some useful counter scripts they are easy to put together. Basic Users online counter CODE <? $remote = $_SERVER["REMOTE_ADDR"]; $file = "usersonline.txt"; $timeoutseconds = 60; //Tells how long the user is considered "on line" $timestamp = time(); $timeout = ($timestamp-$timeoutseconds); $fp = fopen("$file", "a+"); $write = $remote."||".$timestamp."\n"; fwrite($fp, $write); fclose($fp); $online_array = array(); $file_array = file($file); foreach($file_array as $newdata){ list($ip, $time) = explode("||", $newdata); if($time >= $timeout){ array_push($online_array, $ip); } } $online_array = array_unique($online_array); $online = count($online_array); if($online == "1"){ echo "Users Online: $online"; }else{ echo "Users Online: $online"; } ?> Display IP number CODE <?php echo $_SERVER["REMOTE_ADDR"]; ?> Display browser CODE <?php echo $_SERVER["HTTP_USER_AGENT"]; ?> To display a users time when they go to a website you can use one of these set ups. CODE <?php $today0 = date('D F d Y g:i a'); // Wed May 07 2003 1:21 am $today1 = date('F j, Y, g:i a'); // March 10, 2001, 5:16 pm $today2 = date('m.d.y'); // 03.10.01 $today3 = date('j, n, Y'); // 10, 3, 2001 $today4 = date('Ymd'); // 20010310 $today5 = date('h-i-s, j-m-y, it is w Day z'); // 05-16-17, 10-03-01, 1631 1618 6 Fripm01 $today6 = date('\i\t \i\s \t\h\e jS \d\a\y.'); // It is the 10th day. $today7 = date('D M j G:i:s T Y'); // Sat Mar 10 15:16:08 MST 2001 $today8 = date('H:m:s \m \i\s\ \m\o\n\t\h'); // 17:03:17 m is month $today9 = date('H:i:s'); // 17:16:17 echo "
$today1<BR> $today2<BR> $today3<BR> $today4<BR> $today5<BR> $today6<BR> $today7<BR> $today8<BR> $today9"; ?> good place to check out some scripts are at pixel2life.com to get a good idea how to set them up and what not. Tjeck http://www.chart.dk/ or try a CMS system called: PHP-fusion, its very good, I have a site wirt PHP-fusion (www.bestsite)
Reply
Prophet.K
May 6 2008, 12:10 AM
echo $usercount; - displays users. The following code must go at the very top of your page before any HTML is sent to the browser. To call the function and assign the value to a variable, you simple use this line: $usercount = getUsersOnline(); CODE <?php session_start();
function getUsersOnline() { $count = 0;
$handle = opendir(session_save_path()); if ($handle == false) return -1;
while (($file = readdir($handle)) != false) { if (ereg("^sess", $file)) $count++; } closedir($handle);
return $count; } ?>
Reply
Recent Queries:--
useronline ajax -wordpress -wp - 77.82 hr back. (1)
Similar Topics
Keywords : users, online, counter, script
- Online Cemetery
ideas and sugestions (2)
What's The Best Script For Web Designing?
(6) I've been using PHP for about a month and I like it cos it's so powerful. I don't know
about the others like CGI, Perl..etc. Can anybody tell me the MAIN Difference between these
languages? I'd really love to try them out if I know their advantages, pros and cons. I've
been searching the internet for answers, but they are too complicated and use too many jargons that
newbies like me don't understand.....
Free Site Counter Stats
(7) hi frnds everyone want to keep an eye on their site traffic. histats is a really great one i found
with gives site stats for free. it have many amazing features. visit www.histats.com i am
sure u will like it... this is my first post so excuse me if my post have any mistakes....
How To Attract Users To Register On A Site
(13) :rolleyes:Use great graphics an good color which attracts the users/views eyes an capturers there
attention which cuases them to view your website if its good enought they'll register. Also use
good images, links an have blogs an forums also start a referring website such as like this: Visit
this site and know all the info about the CHITWAN http://hamrochitwan.com Some thing like that
would get more users depending on if the items in your shop are GOOD maybe like moderator for a week
costing 100 referals or somethink. /blink.gif" style="vertical-align:middle"....
Why This Error?
PHP script fault (4) Hello, I typed out a PHP script (literally copied from w3schools, the script is as follows: CODE
<html> <body> <?php function spamcheck($field) {
//eregi() performs a case insensitive regular expression match
if(eregi("to:",$field) ||
eregi("cc:",$field)) { return TRUE; } else {
return FALSE; } } //if "email" is filled out, send email if
(isset($_REQUEST['email'])) { //check if the emai....
Can't Delete A Folder On Server!
a small mistake in a script.... (7) I maintain my college's website and since I update it frequently, I decided to
write a php script that would backup all the data in a folder on the server itself. To backup all th
e data I would only need to run the script once in a while: function dircpy($basePath,
$source, $dest, $overwrite = false) { print
"============================================================================ ";
if(!is_dir($basePath . $dest)) mkdir($basePath . $dest);
if($handle = opendir($basePath . $source)) {....
Online Lyric
(3) I wonder the online Synchronous lyrics, how to do that?....
How Do I Create An Online Music Store?
(5) Hi everyone, I'm looking to start a small online music store. I would like to know what would
be the best way to go about it? I don't really want to create a different html page for each
artist/cd etc. I believe it can be done using databases but don't know how to do it. Don't
even know where to start... I'm pretty good with the html required but it's the backend
I'm going to struggle with... The store/site is going to be aimed at a small niche genre of
music so it won't be a huge site. I'm just after some advice as to how best to ....
Photoshop Online
+ It'll be Free (3) a good news for designers who can't use Photoshop on there computers that's what i've
read on this month's PC World Magazine /smile.gif" style="vertical-align:middle" emoid=":)"
border="0" alt="smile.gif" /> QUOTE Graphics giant adobe plans to make a basic version of
it's flagship image editing software, Photoshop, available as a free, Web-based application
later this year. In Public beta at the photosharing site PhotoBucket (www.photobucket.com),
Photoshop's Web verision won't be as full-featured as the desktop application, but it won....
Online Ministry
(4) To Christians, we believe that God has a purpose for us and we all have gifts and talents to help
minister to people. I think that one of my ministries is something to do with computers. Since I am
a "tech wiz" and all, why not use it to His Will. The thing about this is I have no idea what to do
with my skills and utilize them for God. I know there are fellow brothers and sisters here in this
forum, so could you guys help me please?....
Script.aculo.us - A Library Of Ajax Scripts To Improve Your Website's Design
many ways to impress your visitors (0) SCRIPT.ACULO.US Homepage AJAX is a futuristic language used by experts to
program the web. It adds many interesting features which will enhance your website. Click the link
below for a demo of all the things you can do with the AJAX scripts available on script.aculo.us:
http://wiki.script.aculo.us/scriptaculous/show/Demos The current version (1.7.0) of the entire
library of their scripts is available as a download in ZIP , TAR.GZ and TAR.BZ2
format. ZIP {146KB} TAR.GZ TAR.BZ2 Please see the documentation available on....
Inviter Script
(1) Gmail inviters and spoolers abound on the Internet, such as here , and here . I'm not
especially planning to make yet another Gmail inviter, but I'm trying to set up a site that
works like a gmail spooler, but that will distribute links for the free icon/Free Delivery sets at
IconBuffet.com. Does anyone know of any ready-made scripts that does this?....
Reseller Hosting Script
InvasionPanel.com (8) Hey my friend just made a new site selling reseller hosting script Its called InvasionPanel Its a
script Which has cPanel and InvasionPanel (Something like WHM) Features of reseller hosting panel
(InvasionPanel) CODE Administration - Settings - Advertisement settings - Reseller Packages -
Create Reseller - Reseller Management Server - Server Information - Service Status - Reseller
Information - Reseller Usage cPanel Accounts - List Accounts - List Suspended - Create a New Account
- Password Modification - Suspend Account - Unsuspend Account - Terminate Account -....
Need Help Designing Website For Online Novels
Making lots of text comfortable to read (3) I want to start getting my website hammered out, and I realize that I'm not exactly sure how to
balance an attractive design with basic readability. I generally don't like templates and
programs, preferring to work things out from the bottom up as much as possible. I've got some
basic HTML "programming" under my belt, but everything I learned was 5+ years ago, and before CSS.
If possible, I'd like to design something with a "frame" effect over the top of the page and on
the left all the way down with a background for menus and buttons, with the backgrou....
Tweak Your Meta Tags - Best Online Tool Imho
(2) In my opinion, this is the most useful web tool that I ever used to improve my pages. Try to get
all of your scores in the green - and you should have made the bots happy. /wink.gif"
style="vertical-align:middle" emoid=";)" border="0" alt="wink.gif" /> Widexl - Meta Tag Analyzer
v2.1 This might not be that great of a help if you are running any php forum, but perhaps the
settings are there to configure various meta tags per topic, etc. I know that I installed a MOD
that achieves that with my phpbb forums.....
Log In Script!
Please can someone make me a log in script! (6) Hi please can someone either make me a log in script or give me a direct url to a code for one!
Thanks! /biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" />....
How To Incorporate A Php Script To My Website
php beginner needs help (7) Well i dont know exactly how to say this but i ll try. So last few months i ve been discovering web
design, dreamweaver, photoshop. I learned how to create layout and how to preapare it in dreamweaver
but now i am stuck with php. I dont know how to put script in desired cell an lots of other stuff.
yeah i am stupid, but i am who i am. all those tutorials are not helping me because they dont tell
you how to install script where i want. i am going to explode. i tried to find finished script on
hotscripts.com but i cant/dont_know which one will suite my needs. my layout is....
Top Ten Web Script Libraries
(6) 1) Moo.fx - A superlightweight, ultratiny, megasmall javascript effects library, written with
prototype.js. It’s easy to use, fast, cross-browser, standards compliant, provides controls to
modify Height, Width, and Opacity with builtin checks that won’t let a user break the effect with
multiple crazy clicks. It’s also optimized to make you write the lesser code possible. 2) Rico - An
open source JavaScript library for creating rich internet applications. Provides full Ajax support,
drag and drop management, and a cinematic effects library. 3) Swat - Developed by silver....
Drupal Attention All Drupal Users
(0) it looks like there have been some posts about people having trouble getting Drupal cms to install
on trap17.com hosting. I am also looking forward to install drupal on my trap17 account. so if
there is anyone that has got drupal to work on a trap17 account we would all appreciate if you post
step by step directions on how to correctly install drupal on trap17. maybe you could post it as a
tutorial. and for the people that are having trouble getting drupal to work, please post your
problems so the people that know how to do it can help you and i better. i thank you anyo....
Good Guestbook?
and hit counter? (4) I want a guestbook for my other site but... There are seriously thousands... Anyone here know of a
good one? Prefarably one that you can have on your own site... Unless its a pretty good remotely
hosted one... And a hit counter? Once again there are like millions... Dont need detailed stats for
it just a desent counter.......
Free Chat Script
(9) deos anyone know a good, fast, free chat script that i could put in my website. one with out
advertisements. one with no strings attached. everyone these days are trying to make money off every
type of script. only if all scripts were open source. the world would be a much better place. thanks....
Know Any Free Php Online Catalog Scripts
(6) i want to promote the products of the affiliate programs that im involved with. so i wanted to make
online catalog. make and html page for every product would take to long(over 100 products). deos
anyone know a free php online catolog script WITHOUT A SHOPPING CART. that i can easily intergrate
into my site. please help and if you have any questions about answering my question please ask.
please reply. i would appreciate all your help ....
What Is Topsites Script (its In Php)
(5) i have been looking at a lot of php scripts lately and i keep seeing this script over and over
again. its called "topsites". what is this "topsites" scrtipt. its in php and i m new to this stuff
so i woulnt know, and non of websites offering the script actually explains what it is. this is a
big forum so i thought you guys might know what it is. so if you know can you please give me a
simple brief explanation of it and how it can be useful for a webmaster. i would appericate your
help. thank you....
Asp Script For A Social Networking Site!
need a script like hi5 site (3) Helllo guys! Can anyone of you suggest me where can i get a free script like hi5.com either in
asp or php ? plz dont suggest hotscripts.com or to do a google search because both gave me no
quality result thanks in advance....
What's The Best Online Shopping Cart
looking for opions from people (7) I'm creating a shopping cart for a client and was wondering what's the best one out there?
He doesn't have thousands and thousands of items to sell so i'm just looking for something
that really reliable and simple to use because i do not want do tech support for him.round.....
Best Multiple Users Scripting Tool?
Newspro? Movable Type? (1) What is the best multiple users scripting tool that is free? I'm not quite sure if Movable type
is free. More specifically, I would like to know one that I could use for this website.....
Online Game Question
What type of game should it be? (4) I know HTML pretty good, and I know javascript decent. I think I want to make a text-only game, and
I want to know what people would like in a game or what type of game to make. If the game would
require me to learn PHP, then I could probably get into it a little bit, but not too much. Any
suggestions?....
Html Form Help Please
finding a form script (2) Does anyone know of any tutorial or can help me with making a form. I'll describe the situation
and lets see if you can help me. Ok like a few form or text areas that when you put some text into
them they'll input the words from the form area above into another form or textarea under it.
Sort of like an online html maker where you can select your background colors, put an image url in a
field, and some other options THAN you hit a button that says generate. and it generates a website
html source code where you can copy the whole thing and paste into your own we....
Great Script Site
(20) I've loved this site since I first found it a couple years ago. It has 12 php related scripts,
but also links to many other resourceful sites and tutorials, as well as a forum board much like
this one that is pretty straightforward and easy to get help if you have any questions.
codegrrl.com <---check it out!....
script hosting?
(4) does anybody know where to get free script hosting where the scripts are actually good? everywhere i
search, its just crappy scripts people made when they where bored. /huh.gif"
style="vertical-align:middle" emoid=":huh:" border="0" alt="huh.gif" />....
Looking for users, online, counter, script
|
|
Searching Video's for users, online, counter, script
|
advertisement
|
|