Use PING_URL placeholder in the PHP example.

This commit is contained in:
Pēteris Caune 2020-07-07 21:22:56 +03:00
parent 2510e387e6
commit d6c0d9722b
No known key found for this signature in database
GPG Key ID: E28D7679E9A9EDE2

View File

@ -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-&gt;setRetry(20); <span class="x">$curl-&gt;setRetry(20);</span>
$curl-&gt;setTimeout(5); <span class="x">$curl-&gt;setTimeout(5);</span>
$curl-&gt;get('PING_URL'); <span class="x">$curl-&gt;get(&#39;PING_URL&#39;);</span>
```</p> </code></pre></div>
<p>:::php
use Curl\Curl;
$curl = new Curl();
$curl-&gt;setRetry(20);
$curl-&gt;setTimeout(5);
$curl-&gt;get('PING_URL');</p>
<p>Note: this code never throws any exception.</p> <p>Note: this code never throws any exception.</p>