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 today

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

Maturity19

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://avatars.githubusercontent.com/u/6704400?v=4)[Alireza Mohseni](/maintainers/alirexa)[@alirexa](https://github.com/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

[php-http/cache-plugin

PSR-6 Cache plugin for HTTPlug

25126.1M82](/packages/php-http-cache-plugin)[illuminate/http

The Illuminate Http package.

11937.9M6.8k](/packages/illuminate-http)[rdkafka/rdkafka

A PHP extension for Kafka

2.2k24.3k1](/packages/rdkafka-rdkafka)[httpsoft/http-message

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

87965.9k114](/packages/httpsoft-http-message)[mezzio/mezzio-router

Router subcomponent for Mezzio

265.4M90](/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

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

PHPackages © 2026

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