
| To create your own personal visit counter, copy the
cookie function script from the functions page
and paste it in the <HEAD>...</HEAD>
portion of your HTML document. Once you do that, you can embed a script
that employs the universal cookie functions in your document. Take a
look at the following script:
<SCRIPT> function getCookie(name)
{ if (begin == -1) return null; var end = document.cookie.indexOf(";", begin); if (end == -1) end = document.cookie.length; return unescape(document.cookie.substring(begin
+ prefix.length,
end)); function setCookie(name,
value, expires, path, domain, secure) { </SCRIPT> etc... <SCRIPT>var visits = getCookie("counter"); document.write("<FONT COLOR=\"#cc0000\">"); if (visits) { document.write("By
the way, you have been here "); document.write("By
the way, this is your first time here."); document.write("</FONT>"); setCookie("counter", visits); </SCRIPT> NOTE that this script can be placed anywhere on the page. It prints the number of times the user has visited your site.
|