Browse Source

Use PING_URL placeholder in the PHP example.

pull/399/head
Pēteris Caune 4 years ago
parent
commit
d6c0d9722b
No known key found for this signature in database GPG Key ID: E28D7679E9A9EDE2
1 changed files with 9 additions and 13 deletions
  1. +9
    -13
      templates/docs/php.html

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

Loading…
Cancel
Save