How to Find email address from bulk domain names

Authors: CodeToday | PHP Code | Views: 615 | Posted: 07 AM: 09/06/2017

How to Find email address from bulk domain namesIf you have a domain list up to 1 million or several million. You can not enter each domain name and then look up the email address for each domain name. Today I will guide you to take the list of emails from a large number of domain names at once, saving you time and increase your chances of advertising to customers.

This post is the next post of lesson How to find email address from a website urlHere will guide you how to find the email address of a large number of domain names entered.


Instead of creating an input text field, you replace the textarea field to put multiple domain names, Then use the foreach loop to retrieve the data of each domain

foreach($domains as $domain) {
  // $domains get value from textarea field;

You can see full source code below:

include "function.php";
<!DOCTYPE html>
<html lang="en">
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>How to Find email address from bulk domain names</title>
<link rel="stylesheet" href="">
<div class="container">
<h1>How to Find email address from bulk domain names</h1>
<form action="" method="post" class="form-horizontal">
<div class="form-group">
<textarea name="domains" id="domains" class="form-control" placeholder = "Enter per domain per line ..." style="height:150px" required><?=$_POST['domains']?></textarea>
<div class="form-group">
<button type="submit" name="submit" class="btn btn-info">Extract Now</button>

$domains  = explode("

foreach($domains as $domain) {
	$text = fread_url($domain);				
	$resEmail  = preg_match_all("/[a-z0-9_-+][email protected][a-z0-9-]+.([a-z]{2,3})(?:.[a-z]{2})?/i",strtolower($text),$matches);
	if ($resEmail) { 		   
		foreach($matches[0] as $email) { 
			$emailList[] = $email;
	$emailLists = @array_unique($emailList);
	echo '<h4>'.$domain.'</h4>';

If you have any questions, please leave a message below