PHPackages                             peterujah/email-crawl - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. peterujah/email-crawl

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

peterujah/email-crawl
=====================

PHP Email Web Crawler. using curl and command line interface to extract emails from website.

1.0(4y ago)1312MITPHPPHP ^7.0 || ^8.0

Since May 5Pushed 4y ago1 watchersCompare

[ Source](https://github.com/peterujah/email-crawl)[ Packagist](https://packagist.org/packages/peterujah/email-crawl)[ Docs](https://github.com/peterujah/email-crawl)[ RSS](/packages/peterujah-email-crawl/feed)WikiDiscussions main Synced 4w ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

email-crawl
===========

[](#email-crawl)

PHP Email Web Crawler, is a simple and easy to use class that uses curl &amp; command line interface to extract email address from websites. It also has the feature to deep extract email from website link which is found from the initial target website.

Installation
------------

[](#installation)

Installation is super-easy via Composer:

```
composer require peterujah/email-crawl

```

Basic Usage
-----------

[](#basic-usage)

Initalize email crawl instance

```
$craw = new EmailCrawl("https://example.com", 200);
```

Star email crawling scan

```
$craw->craw()
```

Get scanned response and return CrawlResponse instance

```
$response = $craw->getResponse();
```

Get response emails separate in a new line

```
$data = $response->inLine();
```

Get response emails separate with a comma

```
$data = $response->withComma();
```

Get response emails as an array

```
$data = $response->asArray();
```

Print response email

```
$response->printCommandResult($data);
```

Save response emails to file. This will save result as json string

```
$response->save("/path/save/craw/");
```

Save response emails to file. If string data is passed it will save it, els it will save result as json string

```
$response->saveAs("/path/save/craw/", $data);
```

Example

Create a file name it craw.php, inside the file add this example code. With this example you can run your craw directly from `command line, browser or php shell_exec`.

```
error_reporting(E_ALL);
ini_set('display_errors', '1');
require __DIR__ . '/plugins/autoload.php';
use Peterujah\NanoBlock\EmailCrawl;
$target = "https://example.com/contact";
$limit = 50;
if(!empty($argv[1])){
    if(filter_var($argv[1], FILTER_VALIDATE_URL)){
        $target = $argv[1];
        $limit = $argv[2]??50;
    }else{
        $req = unserialize(base64_decode($argv[1]));
        $target = $req["target"];
        $limit = $req["max"]??50;
    }
}
$craw = new EmailCrawl($target, $limit);
$response = $craw->craw()->getResponse();
$data = $response->inLine();
$response->printCommandResult($data)->saveAs(__DIR__ . "/craw/", $data);
```

Execute craw through command line interface, run the below command

```
php craw.php https://google.com 50

```

Execute craw through php shell\_exec, create a file call exec.php and add below example script. Note: change `PHP_SHELL_EXECUTION_PATH` to your php executable path. Once done navigate to

```
define("PHP_SHELL_EXECUTION_PATH", "path/to/php");
$crawOptions = array(
    'target' => 'https://example.com',
    'max' => 50,
);
$crawRequest = base64_encode(serialize($crawOptions));
$crawScript =  __DIR__ . "/craw.php";
$crawLogs =  __DIR__ . "/craw_logs.log";
shell_exec(PHP_SHELL_EXECUTION_PATH . " " . $crawScript . " " . $crawRequest ." 'alert' >> " . $crawLogs . " 2>&1");
```

ATTENTION
=========

[](#attention)

Is advisable to run this code in command line interface for be better performance.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1464d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ce34af529a4ed50696211a2b4d330fbadd2d1738bc5d010523eb4a85cf342b17?d=identicon)[peterujah](/maintainers/peterujah)

---

Top Contributors

[![peterujah](https://avatars.githubusercontent.com/u/16369609?v=4)](https://github.com/peterujah "peterujah (22 commits)")

---

Tags

libraryextractoremailsweb-crawleremail-extractorcrawphp email extractor

### Embed Badge

![Health badge](/badges/peterujah-email-crawl/health.svg)

```
[![Health](https://phpackages.com/badges/peterujah-email-crawl/health.svg)](https://phpackages.com/packages/peterujah-email-crawl)
```

###  Alternatives

[league/iso3166

ISO 3166-1 PHP Library

69536.3M116](/packages/league-iso3166)[league/statsd

A simple library for working with StatsD in PHP.

3514.3M12](/packages/league-statsd)[payum/iso4217

ISO 4217 PHP Library

16312.1M5](/packages/payum-iso4217)[lambdish/phunctional

λ PHP functional library

3612.0M23](/packages/lambdish-phunctional)[dekor/php-array-table

PHP Library for printing associative arrays as text table (similar to mysql terminal console)

296.6M2](/packages/dekor-php-array-table)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
