visitor-statistic

how to count the site current visitors using java script or php

大憨熊 提交于 2019-12-29 09:37:10
问题 I need to get the current site visitors number using Javascript or PHP. I need it using the best way between php and Javascript. 回答1: The following link is a blog post regarding a widget that will allow you to use PHP, MySQL and JavaScript/jQuery. It might be able to point you in the right direction for what you need, and features a tutorial on implementing it. Who Is Online Widget Hope this helps you out. 回答2: Here is another great tutorial that might help you out: http://inobscuro.com

Should I use a text file or a database for a PHP visitor counter?

♀尐吖头ヾ 提交于 2019-12-24 13:46:16
问题 I need to create a visitor counter for my websites and I'm wondering if it is better to store and read the information from a txt file located somewhere in my host or directly from the database. Using a database would mean that a DB entry will be created for every single visitor that will access the site and honestly I don't think that would be OK. 回答1: File counter - when just count. DB counter - when visit tracking, depenences, analysis, aggregation. Read file is really faster, when file is

How to identify unique user?

浪尽此生 提交于 2019-12-18 13:15:34
问题 Question How can you determine if a user is unique or not? I understand there are many ways to do this using cookies, but what about methods that don't use cookies? For example, go to Urban Dictionary and click one of the up/down vote buttons. Even if you delete your cookies and come back to the page, you will not be allowed to cast a vote on the same definition. How do they do this? Purpose Eventually, I'd like to use this unique user detection method on a site where users create accounts.

How to measure visiting time of a user

帅比萌擦擦* 提交于 2019-12-18 03:37:32
问题 I like to measure the time a user spent on a particualr page of my webapp. First i thought about catching the onunload/onbeforeunload event in the browser and notify the server via a XMLHttpRequest that the user is leaving now like: <body onunload="userLeaves('/url/to/current/page',xxx);" ...> ... </body> where xxx is the inital tiemstamp when the page was rendered. Unfortunately this solution doesnt work in all browser (e.g. Opera). So my second idea was to ping the server constantly. To

Determine how many times webpage has been accessed [closed]

时光总嘲笑我的痴心妄想 提交于 2019-12-13 07:56:23
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 3 years ago . I was wondering if there is a way to determine how many times a specific webpage has been accessed on the server. If possible, I would like to do this via cPanel, since the website is made in Wordpress, but the page in question I made from scratch and just uploaded it in another

Visitor Counts in PHP stopped working suddenly

独自空忆成欢 提交于 2019-12-13 07:40:45
问题 I have visitor count script on my website. It was working well until noon (ITC), but now it is not working, also all the files of counts are now not having any text, even a single character. My Codes: <?php if (file_exists('date.txt')) { date_default_timezone_set('Asia/Calcutta'); $cdatel = date('Y-m-d', time()); $dthandle = fopen("date.txt", "r"); //reads date $date = fread($dthandle,filesize("date.txt")); fclose ($dthandle); $tthandle = fopen("total.txt", "r"); //reads total count

track visitor info on every request

匆匆过客 提交于 2019-12-11 05:08:28
问题 Using Asp.net webforms I want to track down visitor info just like Google Analytics does. Of course, I can use Google Analytic for this purpose but I want to know how can I achieve the same thing with Asp.net 3.5 and SQL Server 2008. I want to store IP, Country, URL Referrer of the visitor, Resolution on each page request except postback. I am expecting 50k+ visit everyday. . Main concern is I want to do it in a way that it should not block current request. i.e In general it happens when we

how can I make visitor counter in php? [closed]

纵然是瞬间 提交于 2019-12-01 12:01:51
问题 This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 7 years ago . How I can count visitors ?? I want to insert when open the page and when close or leave the page but not onunload And I don't want to insert when refresh

how can I make visitor counter in php? [closed]

喜欢而已 提交于 2019-12-01 11:41:22
How I can count visitors ?? I want to insert when open the page and when close or leave the page but not onunload And I don't want to insert when refresh the page the below code help me to insert when open the page , but not help when close session_start(); if (!isset($_SESSION["visits"])) $_SESSION["visits"] = 0; if ($_SESSION["visits"] > 1){ echo 'visit='.$_SESSION["visits"]; echo "You hit the refresh button!";} else{ mysql_query( "INSERT INTO najd_visit( visit_userId, visit_staticId, visit_page, visit_enterTime)VALUES ('$userId', '$Sid', '$title', '$date') "); $_SESSION["visits"] = $

How to identify unique user?

邮差的信 提交于 2019-11-30 09:13:33
Question How can you determine if a user is unique or not? I understand there are many ways to do this using cookies, but what about methods that don't use cookies? For example, go to Urban Dictionary and click one of the up/down vote buttons. Even if you delete your cookies and come back to the page, you will not be allowed to cast a vote on the same definition. How do they do this? Purpose Eventually, I'd like to use this unique user detection method on a site where users create accounts. New signups are given a type of "reward" and I want to prevent people from creating multiple accounts in