<?php

$curl = curl_init();
$email = $_POST['email'];

curl_setopt_array($curl, [
	CURLOPT_URL => "https://mailcheck.p.rapidapi.com/?domain=$email",
	CURLOPT_RETURNTRANSFER => true,
	CURLOPT_FOLLOWLOCATION => true,
	CURLOPT_ENCODING => "",
	CURLOPT_MAXREDIRS => 10,
	CURLOPT_TIMEOUT => 30,
	CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
	CURLOPT_CUSTOMREQUEST => "GET",
	CURLOPT_HTTPHEADER => [
		"X-RapidAPI-Host: mailcheck.p.rapidapi.com",
		"X-RapidAPI-Key: e5d6a92e28msh704f95d143e01cap1c7bc6jsnf1e45176b22f"
	],
]);

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

curl_close($curl);

if ($err) {
	echo "cURL Error #:" . $err;
} else {
	echo $response;
}
?>    

