{"id":18373936,"url":"https://github.com/a3r0id/php-rate-limiting","last_synced_at":"2025-04-06T19:32:28.140Z","repository":{"id":151369751,"uuid":"293143163","full_name":"a3r0id/php-rate-limiting","owner":"a3r0id","description":"A simple system to rate-limit site visitors by time interval/request amount.","archived":false,"fork":false,"pushed_at":"2024-05-19T06:07:12.000Z","size":54,"stargazers_count":12,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-22T06:12:35.396Z","etag":null,"topics":["include","measures","php","rate-limiting","security","simple","turnkey","turnkey-script"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/a3r0id.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-05T19:42:30.000Z","updated_at":"2024-09-15T22:28:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"25f1a4dc-2585-4870-aaf7-da7217976aed","html_url":"https://github.com/a3r0id/php-rate-limiting","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a3r0id%2Fphp-rate-limiting","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a3r0id%2Fphp-rate-limiting/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a3r0id%2Fphp-rate-limiting/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a3r0id%2Fphp-rate-limiting/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/a3r0id","download_url":"https://codeload.github.com/a3r0id/php-rate-limiting/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247539375,"owners_count":20955302,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["include","measures","php","rate-limiting","security","simple","turnkey","turnkey-script"],"created_at":"2024-11-06T00:12:48.724Z","updated_at":"2025-04-06T19:32:26.024Z","avatar_url":"https://github.com/a3r0id.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# php-rate-limiting\nA simple system to rate-limit site visitors by time interval/request amount.\n\n## This is NOT a good solution for production use! For a more secure and scalable solution, refer to something like [nikolaposa/rate-limit](https://github.com/nikolaposa/rate-limit).\n\nAdjust specifications via config.json (aka rate-limiting.conf).\n\n-------\n\n## Usage:\n\n[1] Edit your configuration:\n\nNotes:\n\u003cbr/\u003e\nIf \"die_on_rate_limit\" is false then visitor will be redirected to the \"redirect_location\" when limited. \n\u003cbr/\u003e\n\"request_allowance\" should always be (amount to allow + 1) as in regards to the example config, it will limit the visitor on their 25th request, NOT THE 26th!\n\n```json\n[\n    {\n        \"database_file_name\": \"/usr/share/requests.json\",\n        \"interval_time_seconds\": 300,\n        \"request_allowance\": 25,\n        \"redirect_location\": \"https://google.com\",\n        \"die_on_rate_limit\": false \n    }\n]\n```\n[2] - Include in your project\n```php\n\u003c?php\nrequire \"rate-limiting.php\";// Process request\necho \"hello world!\";// If not limited, serve the rest of the file.\n?\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa3r0id%2Fphp-rate-limiting","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fa3r0id%2Fphp-rate-limiting","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa3r0id%2Fphp-rate-limiting/lists"}