Reputation: 53
I have an application uploaded on a web server. I want to display the total number of visitors who have been to my application link. Any idea?
Upvotes: 0
Views: 1387
Reputation: 1517
If you want to display visitors from data table from your server. Use php
$con=mysql_connect("localhost", "username", "password"); if (!$con)
{ die('Could not connect: ' . mysql_error()); } echo "Connected to MySQL
"; mysql_select_db("adil") or die(mysql_error()); echo "Connected to Database";$result = mysql_query("SELECT * FROM test"); echo ""; while($row = mysql_fetch_array($result)) { echo "" . $row['visitor'] . "" . "" . $row['col2'] . ""; // echo "
"; } echo ""; mysql_close($con);
Upvotes: 0
Reputation: 5438
Check this code it uses cookie check and you can update parameters like for how long a visitor is considered unique :
Upvotes: 1