hit-counter/README.md
2024-07-06 16:09:22 +00:00

3 KiB
Raw Permalink Blame History

Hit Counter - Because Nothing Says Retro Like a Hit Counter

Remember Hit Counters? Well, Theyre Back. And Theyre Gloriously useless, personal websites were as unique as fingerprints, and every site proudly flaunted a hit counter? It was the ultimate digital badge of honor—a glaring declaration of how many lost souls had wandered onto your site. Fast forward to now, and it turns out you can relive those glitzy days. Yup, hit counters are back, and they are as gloriously pointless as ever!

Why, Though?

Why on Satans earth would anyone need a hit counter in 2024? Honestly, I haven't got the slightest idea. Most modern web metrics tools can provide far more detailed insights. But hey, who says everything needs to make sense? Sometimes, a little nostalgia is all you need to spice things up.

Features

  • Custom Main Text and Secondary Text: Because why settle for one when you can have two?
  • Hit Counter: See how many times the page is hit. Its like a pissing contest, but for web traffic.
  • Frame Option: For when you want to make things a tad more "extra."
  • Custom Colors: Match your counter to your site's funky style.
  • PNG Output: High-tech stuff.

Requirements

  • PHP 8.x or higher
  • GD Library enabled in PHP

Installation

  1. Clone this fantastic repository:

    git clone https://git.cyberwa.re/revengeday/hit-counter.git
    
  2. Navigate to the project directory:

    cd hit-counter
    
  3. Set proper permissions (because your web server demands it):

    sudo chown -R www-data:www-data .
    sudo chmod -R 755 .
    
  4. Enable the GD Library in your PHP configuration (php.ini):

    ; Make sure this line is uncommented
    extension=gd
    
  5. Enjoy the Retro Vibes: Access the script from your web browser or via curl:

    http://yourserver/hit-counter/script.php
    

Configuration

Edit script.php and personalize as much as you like. Feeling adventurous? Here are some things you might want to tweak:

  • File Paths: $counterFile, $imageFile
  • Image URL: $backgroundImageUrl
  • Text: $customText, $secondaryText
  • Text Positions: $textPositionX, $textPositionY, $secondaryTextPositionX, $secondaryTextPositionY
  • Number Position: $numberPositionX, $numberPositionY
  • Colors: $textColorRGB, $secondaryTextColorRGB, $numberColorRGB, $frameColorRGB
  • Frame Toggle: $drawFrame

Example

$customText = "Hit Counter!";
$secondaryText = "Super cyber, super cool!";
$drawFrame = true;

Contributing

Want to make this even more useless? Fork it, hack it, and send me a pull request.

Contact

Got questions or just feeling nostalgic? Hit me up on the fediverse: @revengeday@corteximplant.com.