jueves, 4 de diciembre de 2025

curl

<?php
// Create a curl handle to a non-existing location
$ch = curl_init('http://404.php.net/');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
if(curl_exec($ch) === false)
{
echo
'Curl error: ' . curl_error($ch);
}
else
{
echo
'Operation completed without any errors';

}


//echo $error =( curl_errno($ch)>0)?curl_error($ch).", error code :  ".curl_errno($ch):"All good";




?>



No hay comentarios:

Publicar un comentario