Problème avec curl
Blasters
-
NHenry Messages postés 15489 Date d'inscription Statut Modérateur Dernière intervention -
NHenry Messages postés 15489 Date d'inscription Statut Modérateur Dernière intervention -
Salut, j'utilise une fonction curl :
La fonction marche bien en localhost sous XAMPP 5.6.11 mais lorsque je met en ligne la fonction sur l'hebergeur, cela m'affiche rien alors qu'en localhost ca m'affiche le code que je voulai
http://www.dailybeta.ga/dailybeta_api2.php?pseudo=AxS
Quelqu'un pourrait m'aider? SVP.
Cordialement
<?php
function look($habboname)
{
$url = "http://www.hbeta.fr/user_profile.php?name=".$habboname;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_USERAGENT, 'HabboBETA API');
$data = curl_exec($ch);
curl_close($ch);
$look = explode('http://www.hbeta.fr/imaging/avatar.php?figure=', $data);
$look = explode('&size=b&direction=4&head_direction=4', $look[1]);
$look = trim($look[0]);
return $look;
}
$pseudo = "AxS";
?>
<?php echo look($pseudo); ?>
La fonction marche bien en localhost sous XAMPP 5.6.11 mais lorsque je met en ligne la fonction sur l'hebergeur, cela m'affiche rien alors qu'en localhost ca m'affiche le code que je voulai
http://www.dailybeta.ga/dailybeta_api2.php?pseudo=AxS
Quelqu'un pourrait m'aider? SVP.
Cordialement
A voir également:
- Problème avec curl
- LDAP avec cURL - Forum Programmation
- Curl grep ✓ - Forum Shell
- Apache curl - Forum Linux / Unix
- Empecher une redirection avec cURL - Forum Programmation
- [PHP] Curl + https ✓ - Forum PHP