PHPackages                             codecrafted/url-extractor - 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. codecrafted/url-extractor

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

codecrafted/url-extractor
=========================

extract URLs from a file, string or webpage

v1.1.6(2y ago)2332MITPHP

Since Nov 4Pushed 2y ago2 watchersCompare

[ Source](https://github.com/SeyedMahmoudMousavi/url-extractor)[ Packagist](https://packagist.org/packages/codecrafted/url-extractor)[ RSS](/packages/codecrafted-url-extractor/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (1)Versions (10)Used By (2)

UrlExtractor
============

[](#urlextractor)

Extract urls from your a file or web address

install
-------

[](#install)

```
    composer require codecrafted/url-extractor

```

### Full expamle :

[](#full-expamle-)

```
    require_once 'vendor/autoload.php';

    use  Codecrafted\UrlExtractor\URL;

    $links = new URL();
    $limit = 50;                            // count of each address you give

    //$url = "https://www.youtube.com";
    // $links->extractURL($url,$limit);

    $urls = [
            "https://www.youtube.com",
            "https://github.com/SeyedMahmoudMousavi"
    ];
    $links->extractURL($urls,$limit);

    $all_url_limtt = 50;                    // how many link you want to export
    $links->limit($all_url_limtt);

    //$links->fileOnly();                   // export only files

    $fileTypes = ['.jpg','mp3'];            // your favorite file types
    $links->fileOnly($fileTypes);

    $links->sortURL();                      // sort links asc
    //$links->sortURL(true);                // sort links desc

    $links->showAsHTML();                   // show in web page
    $string_urls = $links->showURL();       // return as string
    $array_urls = $links->getURL();         // return as array

```

### you can write your data in the file by using this code and library

[](#you-can-write-your-data-in-the-file-by-using-this-code-and-library)

```
    use Codecrafted\IronElephant\File;

    $f = new File();

    $data = $links->showURL();
    $f->write($data, 'links.txt');

```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity48

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

Every ~2 days

Total

8

Last Release

905d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1e722427e1ae0339739bfd49fc0b4dcbd80b421d2415b1dbf6c86ef33cddcd2b?d=identicon)[SeyedMahmoudMousavi](/maintainers/SeyedMahmoudMousavi)

---

Top Contributors

[![SeyedMahmoudMousavi](https://avatars.githubusercontent.com/u/109173807?v=4)](https://github.com/SeyedMahmoudMousavi "SeyedMahmoudMousavi (15 commits)")

---

Tags

composerpackagephpurlurl-extractorurlextractor

### Embed Badge

![Health badge](/badges/codecrafted-url-extractor/health.svg)

```
[![Health](https://phpackages.com/badges/codecrafted-url-extractor/health.svg)](https://phpackages.com/packages/codecrafted-url-extractor)
```

PHPackages © 2026

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