Why email scraping is necessary and what is it? This may be a simple question. In this discussion I will try to give a brief idea about the email address extraction form a website. You may want to sell your product or promote your service to customer. Then email marketing is an important way to promote your service. So to get this email you can collect this email address from various website. To collect manually itâ€™s a tough work for huge website and all links. So we can use some program to do this task.
PHP cURL is a very useful library to collect content from website and then we will extract email from this content using PHP REGEX.
So we need to do two task.
1. Collect content from the website.
2. Then extract email address from the content
You can get some great feature from this simple tools here http://emailscraper.net/
$ch = curl_init(); // initialize curl handle
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_VERBOSE, 0);
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible;)");
curl_setopt($ch, CURLOPT_AUTOREFERER, false);
curl_setopt($ch, CURLOPT_REFERER, 'http://'.$url);
curl_setopt($ch, CURLOPT_URL,$url); // set url to post to
curl_setopt($ch, CURLOPT_FAILONERROR, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);// allow redirects
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); // return into a variable
curl_setopt($ch, CURLOPT_TIMEOUT, 50); // times out after 50s
curl_setopt($ch, CURLOPT_POST, 0); // set POST method
$buffer = curl_exec($ch); // run the whole process
Here is a great tool for collecting email.
Advance Email Scraper You may try once. There a lot feature to collect email like full website cwarling, url crwaling, google, bing, search with facebook, twitter, linkedin, pinterest and so more. Also whois search, email filtering, email validation check, page status check is integrated. Great package. Thanks