par
kodjo » 21 mars 2016, 16:20
voici mon test curl qui ne marche pas (renvoie un array vide, pas de réponse)
function get_content($URL){
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL, $URL);
$data = curl_exec($ch);
curl_close($ch);
return $data;
}
voici mon test curl qui ne marche pas (renvoie un array vide, pas de réponse)
[php]function get_content($URL){
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL, $URL);
$data = curl_exec($ch);
curl_close($ch);
return $data;
}[/php]