elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Estamos en la red social de Mastodon


  Mostrar Temas
Páginas: [1]
1  Programación / PHP / Me ayudais con este código en: 13 Septiembre 2012, 19:45 pm
<?php  $accountId = 3855;
$agentId = "AG1";
$user = "FranDuque";
$password = "091082";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://panel.masvoz.es/rs/supervisor/agent/3855/AG1");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($ch, CURLOPT_USERPWD, "$user:$password");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Accept: application/json"));
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
$jsonString = curl_exec($ch);
$agent = json_decode($jsonString);
echo "$agent->name está $FranDuque->status" . PHP_EOL;?>

me sale en la web esto:
name está $FranDuque->status" . PHP_EOL;?>

Por lo tanto está mal y no sé donde está
Páginas: [1]
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines