|
Visits counter script
|
|
07-26-2011, 09:53 AM
|
|||
|
|||
|
Visits counter script
<script type="text/javaScript"><!--
var caution = false function setCookie(name, value, expires, path, domain, secure) { var curCookie = name + "=" + escape(value) + ((expires) ? "; expires=" + expires.toGMTString() : "") + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + ((secure) ? "; secure" : "") if (!caution || (name + "=" + escape(value)).length <= 4000) document.cookie = curCookie else if (confirm("Cookie exceeds 4KB and will be cut!")) document.cookie = curCookie } function getCookie(name) { var prefix = name + "=" var cookieStartIndex = document.cookie.indexOf(prefix) if (cookieStartIndex == -1) return null var cookieEndIndex = document.cookie.indexOf(";", cookieStartIndex + prefix.length) if (cookieEndIndex == -1) cookieEndIndex = document.cookie.length return unescape(document.cookie.substring(cookieStartIndex + prefix.length, cookieEndIndex)) } function deleteCookie(name, path, domain) { if (getCookie(name)) { document.cookie = name + "=" + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + "; expires=Thu, 01-Jan-70 00:00:01 GMT" } } function fixDate(date) { var base = new Date(0) var skew = base.getTime() if (skew > 0) date.setTime(date.getTime() - skew) } var now = new Date() fixDate(now) now.setTime(now.getTime() + 365 * 24 * 60 * 60 * 1000) var visits = getCookie("counter") if (!visits) visits = 1 else visits = parseInt(visits) + 1 setCookie("counter", visits, now) document.write(' Complimenti! Sei il ' + visits + '° visitatore. '); // --></script> |
|||
|
07-26-2011, 02:21 PM
|
|||
|
|||
|
RE: Visits counter script
It seem nice but there are a lot of free scripts counter that provide from some website for free so for who that lazy can use those for free.
Thank for sharing this code. Millions Thank FreeVPS & LoomHosts for my lovely VPS8 |
|||
|
07-26-2011, 06:11 PM
|
|||
|
|||
|
RE: Visits counter script
I had have another one for php,but Thank you!
|
|||
|
07-26-2011, 11:10 PM
|
|||
|
|||
|
RE: Visits counter script
This just show how many time a client has visited the site. If the client browser does not enable javascript or cookies, this script won't work. Also does not work across browsers.
A side note on the php one, the problem is concurrency, results in lost updates. You must have a database-like mechanism to handler concurrency aspect of the web application. Thân, iCarrot. |
|||
|
07-27-2011, 02:00 AM
|
|||
|
|||
|
RE: Visits counter script
Yup and it is simple also. I think I'll go with whos.amung.us
Patience has a limit and if you choose to be patient beyond this limit then it causes anger.
|
|||
|
08-20-2011, 08:56 PM
|
|||
|
|||
|
RE: Visits counter script
You can get very easy counter ...
I`m now using http://www.99counters.com/ - (HTML)! but have very good style and very functions! like who is online in your website.. Show your statics When you was create the counter and more! |
|||
|
08-20-2011, 10:39 PM
|
|||
|
|||
|
RE: Visits counter script
nero i m using similar ...
|
|||
|
08-20-2011, 10:42 PM
|
|||
|
|||
| RE: Visits counter script | |||
|
08-21-2011, 11:26 PM
|
|||
|
|||
|
RE: Visits counter script
Looks Nice.
![]() |
|||
|
10-06-2011, 02:58 AM
|
|||
|
|||
|
RE: Visits counter script
Wow nice code..i'm going to test it now..
|
|||
|
« Next Oldest | Next Newest »
|
| User(s) browsing this thread: |
| 1 Guest(s) |








![[Image: rule.gif]](http://i213.photobucket.com/albums/cc68/bordbest/rule.gif)
