Integrate MoniTao into your PHP scripts in just a few lines of code.
PHP remains the most used language for server scripts and scheduled tasks. Whether you use a framework (Laravel, Symfony) or vanilla PHP, MoniTao heartbeat integration is simple.
Here are several methods to send a heartbeat ping from PHP, from simplest to most robust.
The quickest method, perfect for simple scripts:
More control over timeouts and errors:
If you're already using Guzzle in your project:
post('https://monitao.com/api/heartbeat/ping/YOUR_TOKEN', [\n 'timeout' => 10\n]);
The ping takes a few milliseconds. If your script is time-critical, run the ping asynchronously or with a short timeout (2-3 sec). If the ping fails, your script continues.
Not required. If MoniTao doesn't receive the ping, it will alert. But checking the response lets you log ping errors on the application side.
Use a short timeout (5-10 sec) and a try/catch. If the ping fails, log the error but let your script continue. MoniTao has 99.9%+ SLA.
Yes! MoniTao accepts optional POST parameters like duration (in seconds) and status. Check the API documentation for details.
Start free, no credit card required.