VB icon

Validates email address

Email
Submitted on: 6/16/2017 11:30:27 AM
By: Henley Howe 
Level: Beginner
User Rating: Unrated
Compatibility: PHP 5.0
Views: 744
 
     The Single Validation API does validation on a single email address and returns all the validation results in either JSON or XML format.
 
code:
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
				
//**************************************
// Name: Validates email address
// Description:The Single Validation API does validation on a single email address and returns all the validation results in either JSON or XML format.
// By: Henley Howe
//**************************************

<?php
$apiKey = 'Enter_License_Key';
$params['format']= 'json';
$params['email'] = 'Enter_Email';
$query = '';
foreach($params as $key=>$value){
$query .= '&' . $key . '=' . rawurlencode($value);
}
$try = 0;
do {
////////////
//For https request, please make sure you have enabled php_openssl.dll extension.
//
//How to enable https
//- Uncomment ;extension=php_openssl.dll by removing the semicolon in your php.ini, and restart the apache.
//
//In case you have difficulty to modify the php.ini, you can always make the http request instead of https.
////////////
$result = file_get_contents('https://api.mailboxvalidator.com/v1/validation/single?key=' . $apiKey . $query);
} while(!$result && $rty++ < 3);
$data = json_decode($result);
print_r($data);
?>


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Beginner category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments


 There are no comments on this submission.
 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.