<?php

$curl = curl_init();

curl_setopt_array($curl, [
	CURLOPT_URL => "https://bin-ip-checker.p.rapidapi.com/?bin=448590",
	CURLOPT_RETURNTRANSFER => true,
	CURLOPT_ENCODING => "",
	CURLOPT_MAXREDIRS => 10,
	CURLOPT_TIMEOUT => 30,
	CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
	CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_SSL_VERIFYPEER => false,
	CURLOPT_POSTFIELDS => json_encode([
		'bin' => '448590'
	]),
	CURLOPT_HTTPHEADER => [
		"Content-Type: application/json",
		"x-rapidapi-host: bin-ip-checker.p.rapidapi.com",
		"x-rapidapi-key: 2c745ad3cdmsha79682c84d1f65ap1249a9jsn0410d57bfe4b"
	],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
	echo "cURL Error #:" . $err;
} else {
	 
 
    // Afficher les données en format JSON
    header('Content-Type: application/json');
    echo json_encode($response, JSON_PRETTY_PRINT);

    

}   