Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 5 of 5
  1. #1
    Senior Member mikeycorn's Avatar
    Join Date
    Mar 2003
    Posts
    272
    Member #
    891
    My client nees a counter that's not based on hits, but a calculation of six ticks an hour from a start point. Anyone know of a php script (or any type of script) that can do the trick?
    ~ mikeycorn
    With over 72,000 questions worth of user submitted quizzes, it's the world's most popular quiz creation software:
    PEST - The Personal Exam Self-Tester

  2.  

  3. #2
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,716
    Member #
    5580
    Liked
    718 times
    Does it count differently for each person logged-in or viewing the site? Or is it one count?
    I'm not sure I understand what it's counting.


  4. #3
    Senior Member mikeycorn's Avatar
    Join Date
    Mar 2003
    Posts
    272
    Member #
    891
    Quote Originally Posted by mlseim, post: 249613, member: 5585
    Does it count differently for each person logged-in or viewing the site? Or is it one count?
    I'm not sure I understand what it's counting.
    My client estimates 240 sales per week, so I need to get a counter that increments one every 42 minutes.
    ~ mikeycorn
    With over 72,000 questions worth of user submitted quizzes, it's the world's most popular quiz creation software:
    PEST - The Personal Exam Self-Tester

  5. #4
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,716
    Member #
    5580
    Liked
    718 times
    You're saying that is doesn't matter how many sales per week ...
    a counter that's not based on hits, but a calculation of six ticks an hour from a start point
    Let's take this scenerio ...

    Right now, the UNIX timestamp is: 1365095917

    So I save that number in a database (startingTimestamp)

    We already know that 42 minutes is 2520 seconds.

    You don't need a counter ....

    Each time he views the website, do this equation:

    (Current timestamp - startingTimestamp)/2520 = How many 42 minute ticks have passed.


  6. #5
    Senior Member mikeycorn's Avatar
    Join Date
    Mar 2003
    Posts
    272
    Member #
    891
    Excellent. That gets me pointed in the right direction, thanks.
    ~ mikeycorn
    With over 72,000 questions worth of user submitted quizzes, it's the world's most popular quiz creation software:
    PEST - The Personal Exam Self-Tester


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 02:32 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com