PHPackages                             gatorv/simple-http - 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. gatorv/simple-http

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

gatorv/simple-http
==================

Simple wrapper for cURL for basic requests

00PHP

Since Aug 18Pushed 8y ago1 watchersCompare

[ Source](https://github.com/gatorv/simple-http)[ Packagist](https://packagist.org/packages/gatorv/simple-http)[ RSS](/packages/gatorv-simple-http/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (1)Used By (0)

SimpleHttpRequest Class
=======================

[](#simplehttprequest-class)

Simple PHP Http Request Wrapper using cURL under the hood.

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

[](#installation)

```
$ php composer.phar require gatorv/simple-http
```

Usage
-----

[](#usage)

Basic Usage

```
use Gatorv\Web\SimpleHttpRequest as Request;

$req = new Request();
list($headers, $body) = $req->get('https://url/');
```

### Main Methods

[](#main-methods)

Perform a GET Request

```
$req->get($url);
```

Perform a POST Request:

```
$req->post($url, $data);
```

Methods
-------

[](#methods)

The following options can be customized on constructing the object (or after construction:

1. redirects - The number of redirects to perform if a Location header is sent.
2. proxy - The proxy and port to use
3. ssl - Wether to verify the SSL certificate or not (for testing)

Also the following methods are available:

Use a Desktop User-Agent:

```
$req->useDesktopAgent();
```

Use a Mobile User-Agent:

```
$req->useMobileAgent();
```

Reset Headers:

```
$req->resetHeaders();
```

Request Compression:

```
$req->requestCompression();
```

Add a HTTP Cookie:

```
$req->addCookie();
```

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1844624?v=4)[Christopher Valderrama](/maintainers/gatorv)[@gatorv](https://github.com/gatorv)

---

Top Contributors

[![gatorv](https://avatars.githubusercontent.com/u/1844624?v=4)](https://github.com/gatorv "gatorv (6 commits)")

---

Tags

curlphp

### Embed Badge

![Health badge](/badges/gatorv-simple-http/health.svg)

```
[![Health](https://phpackages.com/badges/gatorv-simple-http/health.svg)](https://phpackages.com/packages/gatorv-simple-http)
```

###  Alternatives

[php-http/cache-plugin

PSR-6 Cache plugin for HTTPlug

25025.5M80](/packages/php-http-cache-plugin)[illuminate/http

The Illuminate Http package.

11937.2M6.6k](/packages/illuminate-http)[rdkafka/rdkafka

A PHP extension for Kafka

2.2k20.0k1](/packages/rdkafka-rdkafka)[httpsoft/http-message

Strict and fast implementation of PSR-7 and PSR-17

87930.4k113](/packages/httpsoft-http-message)[mezzio/mezzio-router

Router subcomponent for Mezzio

265.3M84](/packages/mezzio-mezzio-router)[serpapi/google-search-results-php

Get Google, Bing, Baidu, Ebay, Yahoo, Yandex, Home depot, Naver, Apple, Duckduckgo, Youtube search results via SerpApi.com

69122.6k](/packages/serpapi-google-search-results-php)

PHPackages © 2026

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