forked from GithubBackups/healthchecks
Use PING_URL placeholder in the PHP example.
This commit is contained in:
parent
2510e387e6
commit
d6c0d9722b
@ -7,17 +7,13 @@
|
|||||||
<p>If you would like to setup timeout and retry options, as discussed in the
|
<p>If you would like to setup timeout and retry options, as discussed in the
|
||||||
<a href="../reliability_tips/">reliability tips section</a>, there is a
|
<a href="../reliability_tips/">reliability tips section</a>, there is a
|
||||||
<a href="https://www.phpcurlclass.com/">curl package</a> available that lets you do that easily:</p>
|
<a href="https://www.phpcurlclass.com/">curl package</a> available that lets you do that easily:</p>
|
||||||
<p>```php startinline=True
|
<div class="highlight"><pre><span></span><code><span class="x">use Curl\Curl;</span>
|
||||||
use Curl\Curl;</p>
|
|
||||||
<p>$curl = new Curl();
|
<span class="x">$curl = new Curl();</span>
|
||||||
$curl->setRetry(20);
|
<span class="x">$curl->setRetry(20);</span>
|
||||||
$curl->setTimeout(5);
|
<span class="x">$curl->setTimeout(5);</span>
|
||||||
$curl->get('PING_URL');
|
<span class="x">$curl->get('PING_URL');</span>
|
||||||
```</p>
|
</code></pre></div>
|
||||||
<p>:::php
|
|
||||||
use Curl\Curl;
|
|
||||||
$curl = new Curl();
|
|
||||||
$curl->setRetry(20);
|
|
||||||
$curl->setTimeout(5);
|
|
||||||
$curl->get('PING_URL');</p>
|
|
||||||
<p>Note: this code never throws any exception.</p>
|
<p>Note: this code never throws any exception.</p>
|
Loading…
x
Reference in New Issue
Block a user