Add README.md
This commit is contained in:
commit
388a4dfeef
1 changed files with 82 additions and 0 deletions
82
README.md
Normal file
82
README.md
Normal file
|
@ -0,0 +1,82 @@
|
||||||
|
# Hit Counter - Because Nothing Says Retro Like a Hit Counter
|
||||||
|
|
||||||
|
[Remember Hit Counters? Well, They’re Back. And They’re Gloriously useless](https://datakra.sh/logs/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. It’s 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**:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
git clone https://git.cyberwa.re/revengeday/hit-counter.git
|
||||||
|
```
|
||||||
|
|
||||||
|
2. **Navigate** to the project directory:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
cd hit-counter
|
||||||
|
```
|
||||||
|
|
||||||
|
3. **Set proper permissions** (because your web server demands it):
|
||||||
|
|
||||||
|
```sh
|
||||||
|
sudo chown -R www-data:www-data .
|
||||||
|
sudo chmod -R 755 .
|
||||||
|
```
|
||||||
|
|
||||||
|
4. **Enable the GD Library** in your PHP configuration (`php.ini`):
|
||||||
|
|
||||||
|
```ini
|
||||||
|
; Make sure this line is uncommented
|
||||||
|
extension=gd
|
||||||
|
```
|
||||||
|
|
||||||
|
5. **Enjoy the Retro Vibes**: Access the script from your web browser or via `curl`:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
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
|
||||||
|
![](https://counter.datakra.sh/example.png)
|
||||||
|
```php
|
||||||
|
$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](https://corteximplant.com/@revengeday).
|
Loading…
Reference in a new issue