Free-Email Lookup PHP Script

This is a php code snippet that I wrote for a website. Thought it might be useful for some one else as I was unable to find any API to check whether the given email address is a free one or not.

There are thousands of websites provide free email address like Yahoo or Gmail.

This database has over 1000 free email id providers.

[php]
$email = $_REQUEST[’email’];
$data = json_decode(file_get_contents("http://vivekv.com/tools/freeemail/index.php?email=$email"),true);
echo ‘<pre>’;
print_r($data);

[/php]

The direct link to the API is

http://vivekv.com/tools/freeemail/index.php?email=someaddress@yahoo.com

You’ll get a JSON encoded result. Converting it to array, you will get

Array
(
[result] => true
[email] => something@yahoo.com
[description] => yahoo.com is believed to be a free email provider
[provider] => yahoo.com
)

Result = True, means the email provider is a free email provider.
Hope this helps.

1 thought on “Free-Email Lookup PHP Script

Leave a Reply

Your email address will not be published. Required fields are marked *