Does anyone know where I could get a users online script, where it shows the number of visitors surfing the site.
Thanks!!
Printable View
Does anyone know where I could get a users online script, where it shows the number of visitors surfing the site.
Thanks!!
I could make one if you would like.
But I would need to know if you wanna use files, or databases.
Which one is better? I'll use the one that's better.
Thanks a lot!
A database would be waaaay better and easier (or so I think), and you could branch off into other features using it.
Ohh cool, do you know where I could get one?
Thanks!
Why not build it yourself? It would help you become a better coder. :)
http://www.combined-minds.net/tutori..._system_in_PHP
It does take some time to get it right, but be patient. You'll be happy and better off when you finally get it.
Thanks!
Ok, I'm already stuck, lol. It says "First we need a way to store the visitor information. The most fast way is a simple MySQL table, so lets create a new table." So where do I create a table? PHPMyAdmin? I can't seem to see anything that says "Create a new table".
Create a DB in phpmyadmin and then create the table in it. Use the query tab in phpmyadmin.
Ok, now I get "Error
SQL query:
1CREATE TABLE c_online(
2time bigint( 20 ) NOT NULL default '0', 3ip varchar( 20 ) NOT NULL default ''4
)
MySQL said:
#1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '1CREATE TABLE c_online (
2 time bigint(20) NOT NULL default ' " after entering that code...
Well, for one, remove the numbers infront of create and time. Second, remove the numbers beside ip and ".
Basically, the numbers go from 1 to 4, remove them and it will probably worked. Unless you put those numbers there yourself.
Also, don't just copy and paste try actually writing the code, yes you'll probably get errors, but it's better than removing the numbers from your code, as you cannot copy and paste without the numbers.
Thanks, I forgot to remove them.
Ok, what is the "root" that is stated.
1<?php
2
3$db=mysql_connect("localhost","root","pass") or die(mysql_error());
4mysql_select_db("test_db",$db);
5
6?>
Change root to your MySQL database username.