PHP script to extract emails

This is a simple php script to extract email address from webpage. This will extract all unique emails and output each in new line. You can modify this script as per your need.

$res = preg_match_all(
if ($res) {
foreach(array_unique($matches[0]) as $email) {
echo $email . "<br />";
else {
echo "No emails found.";

Liked It? Get Free updates in your Email

Delivered by feedburner

Leave a Reply

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