PHPackages                             alirexa/curlreq - 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. alirexa/curlreq

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

alirexa/curlreq
===============

A simple and easy php class for send curl request

12PHP

Since Apr 30Pushed 2y ago1 watchersCompare

[ Source](https://github.com/Alireza-Rajabzadeh/curlReq)[ Packagist](https://packagist.org/packages/alirexa/curlreq)[ RSS](/packages/alirexa-curlreq/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

curlReq
=======

[](#curlreq)

A simple and easy php class for send curl request

install package using :

```
composer require alirexa/curlreq

```

init curl with this :

```
$request = new CurlReq();

$request->setUrl("example.com/something");

$request->json(); //data will json encoded and json headers add

$request->setData($data); //add data in array

$request->setHeaders($your_array_headers); // set  headers

$request->setTimeOut($Second); //request timeout

```

you can trun Exception on or off by call Exception(false or true) on true exception will throw and on false will not default is false :

```
$request->Exception(false); # exception off
$request->Exception(true); # exception on

```

use get,post,put,delete method base on url accepted method :

```
$request->get();
$request->post();
$request->put();
$request->delete();

```

Response detail :

```
$request->response_httpcode; //get request http code
$request->response_headers; // get request headers
$request->response; //get parsed responsed
$request->curl_result; // get curl raw response
$request->errors; // get error if exist
$request->error_number ; get error number if exis

```

Or you can get all in one array by call responseInArray() ;

```
$request->responseInArray();

```

Let me know if something works wrong by send me an email:

thanks

###  Health Score

13

—

LowBetter than 1% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity18

Early-stage or recently created project

 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://www.gravatar.com/avatar/5a4664877a1555bae01b95030b99ace0d79288112b4041dc77cb357d8d2a009c?d=identicon)[alirexa](/maintainers/alirexa)

---

Top Contributors

[![Alireza-Rajabzadeh](https://avatars.githubusercontent.com/u/39335148?v=4)](https://github.com/Alireza-Rajabzadeh "Alireza-Rajabzadeh (1 commits)")

### Embed Badge

![Health badge](/badges/alirexa-curlreq/health.svg)

```
[![Health](https://phpackages.com/badges/alirexa-curlreq/health.svg)](https://phpackages.com/packages/alirexa-curlreq)
```

###  Alternatives

[friendsofsymfony/rest-bundle

This Bundle provides various tools to rapidly develop RESTful API's with Symfony

2.8k73.3M319](/packages/friendsofsymfony-rest-bundle)[php-http/discovery

Finds and installs PSR-7, PSR-17, PSR-18 and HTTPlug implementations

1.3k309.5M1.2k](/packages/php-http-discovery)[nyholm/psr7

A fast PHP7 implementation of PSR-7

1.3k235.4M2.4k](/packages/nyholm-psr7)[pusher/pusher-php-server

Library for interacting with the Pusher REST API

1.5k94.8M293](/packages/pusher-pusher-php-server)[spatie/crawler

Crawl all internal links found on a website

2.8k16.3M52](/packages/spatie-crawler)[react/http

Event-driven, streaming HTTP client and server implementation for ReactPHP

78126.4M414](/packages/react-http)

PHPackages © 2026

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