PHPackages                             atk14/url-fetcher - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. atk14/url-fetcher

ActiveLibrary[HTTP &amp; Networking](/categories/http)

atk14/url-fetcher
=================

Class providing methods to make http requests

v1.8.6(8mo ago)044.1k—2.6%6MITPHPPHP &gt;=5.3.0

Since Jan 24Pushed 8mo ago2 watchersCompare

[ Source](https://github.com/atk14/UrlFetcher)[ Packagist](https://packagist.org/packages/atk14/url-fetcher)[ Docs](https://github.com/atk14/Translate)[ RSS](/packages/atk14-url-fetcher/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (32)Used By (6)

UrlFetcher
==========

[](#urlfetcher)

UrlFetcher is a PHP class providing methods to make http requests

Basic usage
-----------

[](#basic-usage)

```
$fetcher = new UrlFetcher("http://www.example.com/content.dat");

if(!$fetcher->found()){
  echo $fetcher->getErrorMessage();
  exit(1);
}

$content = $fetcher->getContent();

$status_code = $fetcher->getStatusCode(); // e.g 200
$content_type = $fetcher->getContentType(); // e.g. "application/pdf"
$request_headers = $fetcher->getRequestHeaders();
$response_headers = $fetcher->getResponseHeaders();

```

HTTP basic authentication or non-standard port can be specified within the URL.

```
$fetcher = new UrlFetcher("https://username:password@www.example.com:444/private/content.dat");
if($fetcher->found()){
  echo $fetcher->getContent();
}else{
  echo $fetcher->getErrorMessage();
}

```

### Make a POST requests

[](#make-a-post-requests)

```
$fetcher = new UrlFetcher("https://www.example.com/api/en/articles/create_new/");
if($fetcher->post(["title" => "Sample article", "body" => "Lorem Ipsum..."])){
  echo $fetcher->getContent();
}

```

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

[](#installation)

Use the Composer to install the UrlFetcher.

```
cd path/to/your/project/
composer require atk14/url-fetcher

```

Licence
-------

[](#licence)

UrlFetcher is free software distributed [under the terms of the MIT license](http://www.opensource.org/licenses/mit-license)

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance61

Regular maintenance activity

Popularity27

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity69

Established project with proven stability

 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 ~121 days

Recently: every ~194 days

Total

27

Last Release

245d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6304dffbd91d7a978f98632b0e4e30d662dcdb691daadb1388a58984e98faf5c?d=identicon)[yarri](/maintainers/yarri)

---

Top Contributors

[![yarri](https://avatars.githubusercontent.com/u/974278?v=4)](https://github.com/yarri "yarri (105 commits)")

---

Tags

httpurlutilsdownload

### Embed Badge

![Health badge](/badges/atk14-url-fetcher/health.svg)

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

###  Alternatives

[guzzlehttp/psr7

PSR-7 message implementation that also provides common utility methods

7.9k1.0B3.2k](/packages/guzzlehttp-psr7)[league/uri

URI manipulation library

1.1k206.4M277](/packages/league-uri)[league/uri-interfaces

Common tools for parsing and resolving RFC3987/RFC3986 URI

536204.9M23](/packages/league-uri-interfaces)[jbzoo/utils

Collection of PHP functions, mini classes and snippets for everyday developer's routine life.

8321.5M36](/packages/jbzoo-utils)[aplus/http

Aplus Framework HTTP Library

2311.6M10](/packages/aplus-http)[nette/http

🌐 Nette Http: abstraction for HTTP request, response and session. Provides careful data sanitization and utility for URL and cookies manipulation.

48819.2M541](/packages/nette-http)

PHPackages © 2026

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