Jump to content

Search the Community

Showing results for tags 'counter'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL








Donation Link

Found 5 results

  1. I have a download section in my index.php that I'd like to add a download counter to but have no idea how to accomplish this. The existing code works perfectly but I'd like to know how many times the file is downloaded. Would prefer not to use a database. <!-- DOWNLOAD --> <div id="download" class="stylized"> <div "myform"> <div class="container"> <div class="row"> <div class="download"> <br /><br> <h1><center>FoxClone Download Page</center></h1> <?php $files = glob('download/*.iso'); $file = $files[count($files) -1]; $info = pathinfo($file); $filename = basename($file); $filename = ltrim($filename,'/'); $md5file = md5_file($file); ?> <div class="container"> <div class="divL"> <h3>Get the "<?php echo "{$filename}";?>" file (approx. 600MB)</h3> <center> <a href="<?php echo "/{$file}";?>"><img src="images/button_get-the-app.png" alt=""></a> </center><br /> <h3 style="margin-bottom: 0.5rem;">The MD5sum for "<?php echo "{$filename}";?>" is "<?php echo "{$md5file}";?> Thanks in advance, Larry
  2. I would appreciate if someone could figure this out or tell me the easiest way to do this. I need a count up counter that appears in a textbox so I can record the time a user is on a page. On a side note, I do have their Start and finish time timestamp recorded in myphpadmin database but I am looking for the easiest (or best) way to do this. Any advice or scripts would be very much appreciated. Thanks in advanced. I did find this counter that works but the numbers appear 0.0.1 if counting up. I don't want to confuse the user. I really want to display to the user how long they was on a certain page. <script> $(document).ready(function() { var time = '00:00:00', parts = time.split(':'), hours = +parts[0], minutes = +parts[1], seconds = +parts[02], input = $('#timeInput'); var timer = setInterval(function(){ seconds++; if(seconds == 60) { seconds = 00; minutes++; if(minutes == 60) { minutes = 00; hours++; } } var newTime = hours + ":" + minutes + ":" + seconds; $('#timeInput').val(newTime); }, 1000); }); </script> <input type="text" name="time" id="timeInput"/>
  3. I know this should be easy but I cannot find right query to do this online. I simple want a counter of each result of my query. What is the proper way to query this. For example 1 | Result 1 2 | Result 2 3 | Result 3 The one I found online did a weird grouping counter. Thanks
  4. Hello i have a question, how to make a daily - weekly - monthly unique counter like, daily = when new day starts save old day.txt begin new day.txt weekly = when new week starts save old week.txt begin new week.txt monthly = when new month start save old month.txt begin new month.txt i know that you can count unique visitors but i dont know if you also can safe the file and start new file. Is that possible ?
  5. I'm a big fan of Big Brother UK and as a fun project I have built a Twitter hash tag counter to count the battle between the contestants this year. Using the API from Topsy.com I have built a counter that shows the amount of tweets daily, monthly and hourly. However, I wondered if it was possible for me to calculate the amount of tweets say between the time the page was loaded and the time a user clicks stop so I can see how the numbers have change during the show. Would it be possible to use the setTimeOut() function or is there a better way of doing this? heres my code: <?php error_reporting(0); $jsonurl = "http://otter.topsy.com/searchcount.json?q=%23teamrylan&type=tweet&apikey=FJWCK5YSZIBEUZX4HYJQAAAAABLTPFQ3DVIQAAAAAAAFQGYA"; $json = file_get_contents($jsonurl, 0, null, null); $json_output = json_decode($json, true); $json_output = array_values($json_output); foreach ($json_output as $key => $val) { $hourly = number_format($val["h"]); $daily = number_format($val["d"]); $weekly = number_format($val["w"]); $monthly = number_format($val["m"]); $alltime = number_format($val["a"]); } echo '<strong>How many times have people tweeted #TeamRylan</strong><br /><br />'; echo 'In the last Hour: ' . $hourly . '<br />'; echo 'In the last Day: ' . $daily . '<br />'; echo 'In the last Week: ' . $weekly . '<br />'; echo 'In the last Month: ' . $monthly . '<br />'; echo 'Ever: ' . $alltime . '<br />'; ?>
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.