Download the PHP package raitocz/pinger without Composer
On this page you can find all versions of the php package raitocz/pinger. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download raitocz/pinger
More information about raitocz/pinger
Files in raitocz/pinger
Package pinger
Short Description Tiny PHP library used to ping desired URLs
License MIT
Informations about the package pinger
Pinger
- Installation
- Introduction
- Basic usage
Installation
composer require raitocz/pinger
Introduction
This project is under development, it is recommended to wait with usage for stable release (soon).
Tiny PHP library used to ping desired URLs. You can use proxy list to ping as from different computer making this tool handy when you wan to test the server load from different IPs. Use at your own risk, you can DDoS yourself or get blacklisted for attacking another server.
The user agent is generated from random numbers so the server is tricked to be believing that each request came from different computer (although from same IP if no proxy list specified).
This script is working well for example with unprotected polls for adding votes (ones where links are not generated for each page reload) as this was the reason why it was created & later transformed to this library.
Warnings
This script can also clog your computer fast as it is making each request as separate PHP process, so too fast settings can flood your RAM. That's why the Wait time is in Seconds. Although you can set it for example to 0.000001 I highly don't recommend that. Setting it to 0.1 will flood free 16GB RAM in few seconds, for example.
Please also note the limitations of Windows systems for usleep() which is used: http://php.net/manual/en/function.usleep.php
Basic usage
Simplest request to one url 100x each second:
Here are examples of diferent modes (used only static method for shorter code):
Random mode (default)
result:
Random mode No repeat
result:
Batch URL
result:
Batch Array
result: