<?PHP
$url = "https://api.iglao.com/v1/vps/start?key=YOUR_SERVICE_API_KEY";
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_HTTPGET, true);
curl_setopt($curl, CURLOPT_TIMEOUT, 3);
$response = curl_exec($curl);
curl_close($curl);
$json = json_decode($response, TRUE);
var_dump($json); // display all returned results
// uncomment the line under to display results separately:
// echo $json['message']; // here, show result of "message" only
?>
fetch('https://api.iglao.com/v1/vps/start?key=YOUR_SERVICE_API_KEY')
.then(response => response.json())
.then(data => {
console.log(data); // display all returned results
// uncomment the line under to display results separately:
console.log(data.map(result => result.message)); // here, show result of "message" only
})
.catch(error => {
console.error('Error during the json fetch :', error);
});
import requests
url = "https://api.iglao.com/v1/vps/start?key=YOUR_SERVICE_API_KEY"
response = requests.get(url, timeout=3)
if response.status_code == 200:
json_data = response.json()
print(json_data) // display all returned results
# uncomment the line under to display results separately:
# print(json_data['message']) # here, show result of "message" only
else:
print("Error during the request.")