ビルドだけしてみる
$APIUrl = 'http://www.email-validator.net/api/verify';
$Params = array('EmailAddress' => $Email,
'APIKey' => '[your API key]');
$Request = @http_build_query($Params);
$ctxData = array(
'method' => "POST",
'header' => "Connection: close\r\n".
"Content-Length: ".strlen($Request)."\r\n",
'content'=> $Request);
$ctx = @stream_context_create(array('http' => $ctxData));
// send API request
$result = json_decode(@file_get_contents(
$APIUrl, false, $ctx));
// check API result
if ($result && $result->{'status'} > 0) {
switch ($result->{'status'}) {
// valid addresses have a {200, 207, 215} result code
case 200:
case 207:
case 215:
echo "Address is valid.";
break;
case 114;
// retry
break;
default:
echo "Address is invalid.";
echo $result->{'info'};
echo $result->{'details'};
break;
}
} else {
echo $result->{'info'};
}
あなたのコードに