fork download
  1. <?php
  2. // Configuración de la solicitud
  3. $myCheck = [
  4. "Service" => 0,
  5. "Imei" => "330068098238312",
  6. "Key" => "9GI-BA4-BCU-E6A-IAC-IAA-PL1-0UW"
  7. ];
  8.  
  9. // Inicializar cURL
  10. $ch = curl_init("https://a...content-available-to-author-only...o.uk/");
  11.  
  12. // Configurar opciones de cURL
  13. curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($myCheck));
  14. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  15. curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 60);
  16. curl_setopt($ch, CURLOPT_TIMEOUT, 60);
  17.  
  18. // Ejecutar la solicitud y obtener la respuesta
  19. $httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
  20.  
  21. // Procesar la respuesta
  22. if ($httpcode == 200) {
  23. $myResult = json_decode(curl_exec($ch));
  24. if ($myResult->success == true) {
  25. echo $myResult->response;
  26. echo "<pre>", print_r($myResult->object, true), "</pre>";
  27. // Aquí puedes acceder a información específica!
  28. echo $myResult->object->model; // Ejemplo de acceso al modelo
  29. } else {
  30. echo "Error: " . $myResult->error;
  31. }
  32. } else {
  33. echo "Error: HTTP Code $httpcode";
  34. }
  35. ?>
Success #stdin #stdout 0.03s 25952KB
stdin
Standard input is empty
stdout
Error: HTTP Code 0