Number Of Vists

CK CK 3788 
Created at
Updated at  
512 0 0

Get the Number Of Vists!

 

<script language="Javascript">
<!--
// please keep these lines on when you copy the source
// made by: Nicolas - http://www.javascript-page.com

function getCookieVal (offset) {
  var endstr = document.cookie.indexOf (";", offset);
  if (endstr == -1)
    endstr = document.cookie.length;
  return unescape(document.cookie.substring(offset, endstr));
}

function GetCookie (name) {
  var arg = name + "=";
  var alen = arg.length;
  var clen = document.cookie.length;
  var i = 0;
  while (i < clen) {
    var j = i + alen;
    if (document.cookie.substring(i, j) == arg)
      return getCookieVal (j);
    i = document.cookie.indexOf(" ", i) + 1;
    if (i == 0) 
      break;
  }
  return null;
}

function SetCookie (name, value) {
  var argv = SetCookie.arguments;
  var argc = SetCookie.arguments.length;
  var expires = (argc > 2) ? argv[2] : null;
  var path = (argc > 3) ? argv[3] : null;
  var domain = (argc > 4) ? argv[4] : null;
  var secure = (argc > 5) ? argv[5] : false;
  document.cookie = name + "=" + escape (value) +
    ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
    ((path == null) ? "" : ("; path=" + path)) +
    ((domain == null) ? "" : ("; domain=" + domain)) +
    ((secure == true) ? "; secure" : "");
}

function DeleteCookie(name) {
  var exp = new Date();
  FixCookieDate (exp); // Correct for Mac bug
  exp.setTime (exp.getTime() - 1);  // This cookie is history
  var cval = GetCookie (name);
  if (cval != null)
    document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
}

var expdate = new Date();
var num_visits;
expdate.setTime(expdate.getTime() + (5*24*60*60*1000));
if (!(num_visits = GetCookie("num_visits")))
  num_visits = 0;
num_visits++;
SetCookie("num_visits",num_visits,expdate);
//-->
</script>

<script language="Javascript">
<!--
// please keep these lines on when you copy the source
// made by: Nicolas - http://www.geocities.com/ResearchTriangle/1500

document.write("You have been to this page "+num_visits+" times.");
//-->

</script>


 

Tags Cookie GetCookieVal HTML Javascript Popup Blocking setTime Facebook X
Comments 0
Similar posts
  1. Add Message On Mouse Traling
    2,557
  2. How to calculate page loading time ?
    360
  3. Tooltip
    408
  4. Move window
    548
  5. Document Fader
    346
  6. Book Mark This Site
    405
  7. Icon Coupled Url
    427
  8. Button That Will Close The Browser Window
    350
  9. Button That Will Show The Page's Source
    387
  10. Add A Scrolling Status Bar Text To Your Site
    408
  11. Add This Page To Favorites
    400
  12. Code To Clear Browser History
    375
  13. Remove the spaces before begin and after end of text
    336
  14. How To Close A Pop-up Window ?
    443
  15. Pop Up Window On Top
    516
  16. How to display message on browser status bar ?
    476
  17. New Window
    604
  18. Color Table
    365
  19. Cursor Changer
    383
  20. Dual Scroller
    332
  21. Enlarge Image
    514
  22. Confirm The Link Clicked
    631
  23. Select And Deselect All Checkboxes By Javascript
    632
  24. Javascript Mouse Event Handler Example
    403
  25. Getting WebSearchers On Your Site
    373
  26. Hiding HTML on the browser
    461
  27. How to get date time in Javascript ?
    498
  28. Javascript based Alarm Clock
    666
  29. Javascript implemented Calendar
    421
  30. Basic Date Display
    511
  1. How to know the browser name in Javascript ?
    639
  2. Select All, None, Invert checkbox
    506
  3. Simple RSS Reader based on javascript
    502
  4. How to find the ip address of a client machine from a web application?
    518
  5. Put Date Time on HTML
    551
  6. IFRAME Auto Resize in IE, FireFox by Javascript
    455
  7. How to elimiate the "Restore Previous Session" dialog when FireFox 2.0 starts
    409
  8. How to include Javascript from anonther ?
    411
  9. Javascript based Browser Sniffing
    433
  10. Javascript based Regular Expression Tester
    374
  11. Two useful string functions - substr & substring
    407
  12. How to block a connection from the certain site ?
    352
  13. Is there URLEncode function in Javascript ?
    393
  14. Move window
    548
  15. How to calculate page loading time ?
    360
  16. Add Message On Mouse Traling
    2,557
  17. Tooltip
    408
  18. Document Fader
    346
  19. Book Mark This Site
    405
  20. Icon Coupled Url
    427
  21. Button That Will Close The Browser Window
    350
  22. Button That Will Show The Page's Source
    387
  23. Add A Scrolling Status Bar Text To Your Site
    408
  24. Add This Page To Favorites
    400
  25. Code To Clear Browser History
    375
  26. Remove the spaces before begin and after end of text
    336
  27. How To Close A Pop-up Window ?
    443
  28. Pop Up Window On Top
    516
  29. How to display message on browser status bar ?
    476
  30. New Window
    604
Recently updated
  1. Why 100% SEO Guarantees Better User Engagement and How to Achieve It in Your Service
    40
  2. Why SPF and DKIM Are Essential for Linux Email Servers?
    34
  3. How do I create animated background for Google Meet?
    20,613
  4. MaxMind GeoLite2 vs. DB-IP Lite vs. ip-api.com: Choosing the Right Free IP Geolocation Solution
    244
  5. Meet Valkey: Why Redis Changed Its License, Why Valkey is Better, and How to Use It as a Drop-in Replacement
    94
  6. How Rogue Web Scrapers Are Stealing My Content and Destroying My Server
    157
  7. Array of arguments passed to script in PHP
    90
  8. Invalid Auction Storms in Ad Tech
    98
  9. Building MRC-Compliant Instrumentation in Ad Tech: Implementation Steps and Key Challenges
    202
  10. The Two Clocks of Ad Server Architecture
    70
  11. Frequency Cap Architecture Overview
    514
  12. Collecting Proof-of-Play from 100,000 Screens
    146
  13. Vector Search in Relational Databases (RDBs): Trends & Usage Environments
    287
  14. What is RedisVL?
    109
  15. Designing a Skill Registry Architecture: Minimize Token Usage and Maximize AI Performance
    230
  16. TPU & GPU Cluster Management Tools
    244
  17. The Concept of Scaffolding in AI Agents
    233
  18. Beyond Static Pipelines: Architecting LLM Multi-Agent Systems for Autonomous Workflow Orchestration
    583
  19. AI-DLC vs. AI-SDLC: Model-Centric vs. System-Centric AI Development
    258
  20. Fine-Tuning Open-Weight LLMs: Training, Licensing, and Deploying Custom Models with Ollama
    339
  21. Inside the Next-Generation Streaming Architecture: Ultra-Low Latency, SGAI, and AI Codecs
    202
  22. Machine Learning: Training vs. Ranking
    221
  23. The Continuous Learning Machine: Designing a Loop That Actually Turns
    222
  24. The Next-Gen Low-Latency Standards: LL-HLS & MoQ
    195
  25. Designing a Data Curation System Around a Vector Database
    220
  26. Extracting Context from Live Video: The Architecture Got Simpler When We Stopped Building Features
    256
  27. The New Ad Stack Behind Live Sports Streaming: Inside SGAI, EABN, and the Standards Race to Fix Live Monetization
    656
  28. Designing MLOps Architectures to Handle Seasonal Data Drift in EV Fleet Models
    195
  29. From 15 to 40+ FPS: Accelerating PyTorch Object Detection on Automotive ECUs
    217
  30. Understanding Data Lineage
    260