Databases :: SQL Compatibility issues :: No. of site visitors? |
|||
| By: FiatLink |
Date: 05/10/2004 00:00:00 |
Points: 40 | Status: Answered Quality : Excellent |
|
How can I know the number of my site visitors ? I am using php in my site, I searched in php functions but none helped me , I think i need a Javascript function ... is there any Javascript samples for other common tasks (any links..or whatever), i need such codes for many other tasks. thanks in advance.. |
|||
| By: hussaini | Date: 05/10/2004 15:04:00 | Type : Answer |
|
| Hi, There are other sites that provide this facilty like <A HREF="http://www.nedstatbasic.net/">http://www.nedstatbasic.net/</A> which show how many visitors your website has and from which country they are comming even which isp they are using the will give u a code like this. <script language="JavaScript" src="basic.js"> </script> <script language="JavaScript"> <!-- nedstatbasic("AB2RGgRpeCx4I1eXRP2wBCJrs7ng", 1 ); // --> </script> <noscript> <a target="_blank" href="<A HREF="http://v1.nedstatbasic.net/stats?AB2RGgRpeCx4I1eXRP2wBCJrs7ng">http://v1.nedstatbasic.net/stats?AB2RGgRpeCx4I1eXRP2wBCJrs7ng</A>"><img src ="<A HREF="http://m1.nedstatbasic.net/n?id=AB2RGgRpeCx4I1eXRP2wBCJrs7ng">http://m1.nedstatbasic.net/n?id=AB2RGgRpeCx4I1eXRP2wBCJrs7ng</A>" border="0" width="1" height="1" nosave></a></noscript> <!-- End Nedstat Basic code --> if u want to hide the graphic from other you can download basic.js file from <A HREF="http://www.pindionline.com/basic.js">http://www.pindionline.com/basic.js</A> and save it at you server and change the first line (Phat of basic.js file) to the where you have loaded. This code is working at my website <A HREF="http://www.pindionline.com/">http://www.pindionline.com/</A> Kamzi. |
|||
| By: hussaini | Date: 05/10/2004 15:17:00 | Type : Comment |
|
| You Must have to register to get the hit counter facilty with <A HREF="http://www.nedstatbasic.net/">http://www.nedstatbasic.net/</A> |
|||
| By: VGR | Date: 06/10/2004 18:55:00 | Type : Assist |
|
| easy : use a session variable. When not set on entry into index.php (or whatever establishes the session first), then count one more visitor (write to DB, to a textfile, whatever) and set the session variable. rather straightforward |
|||
| By: trifazic | Date: 09/10/2004 17:48:00 | Type : Comment |
|
| Hi. Read: <A HREF="http://hoohoo.ncsa.uiuc.edu/cgi/env.html">http://hoohoo.ncsa.uiuc.edu/cgi/env.html</A> If you will use this method to count your users, you will need to use this variable ------------------------------ $_SERVER["REMOTE_ADDR "] The IP address of the remote host making the request. (PHP Manual) ------------------------------ Example: <?php echo $_SERVER["REMOTE_HOST"]; ?>; // (PHP Manual) If you have an php manual you will find more information in: [Appendixes] -> [List of Reserved Words] -> [Predefined Variables] More, if you want an domain name for that ip, you can use ------------------------------ dns_get_record -- Fetch DNS Resource Records associated with a hostname ------------------------------ after learning about the above mentioned, you should create a mysql table to record your clients ip's and/or domain names every time someone opens your page, in the beggining of your php script, you should include a piece of code that logs your clients ip, and checks if the client visited your page in that day. if you use a Win client to develop your application, you could help yourself a lot, by downloading a .chm format manual from <A HREF="http://www.php.net">www.php.net</A>, if not, the online version is just as good. |
|||
| By: trifazic | Date: 09/10/2004 17:53:00 | Type : Comment |
|
| hi again...i just observed that mentioning [dns_get_record] was stupid, because it does not make what i claimed it does, which is obvious, for peoples who use to sleep enough the rest of the solution is correct |
|||
| By: nisgar2k | Date: 10/10/2004 20:31:00 | Type : Comment |
|
| I use <A HREF="http://www.statcounter.com">www.statcounter.com</A> and have found it very useful for finding out loads of statistics including: - Browser type and version. - Unique visitor - Page Loads - Domains they came from very useful for finding what keywords they typed in on a search engine to get to your site. - Time they visited, date etc - Even the path they took through your site. as well as loads more... Check it out sometime its very simple to set up as well and just involves a small amount of javascript to insert in the header and the actual counter can be set up to be invisible or not. I also put the js in an external file and provide it as a link to save copying and pasting lots of code all the time. Doesnt seem to make much difference to load times so ideal solution really. Nick |
|||
| By: iLvChopin | Date: 10/10/2004 20:44:00 | Type : Comment |
|
| <A HREF="http://www.andale.com">www.andale.com</A>, their counter service is free. You can choose different public display styles or private display that only you can view the access numbers... |
|||
|
Do register to be able to answer |
|||
©2010 These pages are served without commercial sponsorship. (No popup ads, etc...). Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE.
Please DO link to this page!








