In the following script will perform a check on a URL, but mind you, this is not a review of the “syntax” of a URL, but its very existence, thanks to the cURL library, please contact the landing page and verify status.
Now to the code needed for our little script:
<span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">$controllo = curl_init();</span> $ Check = curl_init ();</span>
<span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">curl_setopt($ch, CURLOPT_URL, "http://www.sito.it");</span> curl_setopt ($ ch, CURLOPT_URL, "http://www.sito.it");</span>
<span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">curl_setopt($ch, CURLOPT_HEADER, true);</span> curl_setopt ($ ch, CURLOPT_HEADER, true);</span>
<span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">curl_setopt($ch, CURLOPT_NOBODY, true);</span> curl_setopt ($ ch, CURLOPT_NOBODY, true);</span>
<span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);</span> curl_setopt ($ ch, CURLOPT_RETURNTRANSFER, true);</span>
<span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">$esecuzione = curl_exec($controllo);</span> $ Execution = curl_exec ($ check);</span>
<span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">curl_close($controllo);</span> curl_close ($ check);</span>
<span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">echo $esecuzione;</span> echo $ run;</span>
The script will initialize a cURL session based on URL passed as an argument, the proposed code can be used to further improve the efficiency of our form.