PHPackages                             srvclick/scurl - 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. srvclick/scurl

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

srvclick/scurl
==============

Easy PHP Curl Library

1.0.0.9(1y ago)0411MITPHPPHP &gt;=8.1

Since Jun 4Pushed 1y ago1 watchersCompare

[ Source](https://github.com/SrvClick/SCURL)[ Packagist](https://packagist.org/packages/srvclick/scurl)[ RSS](/packages/srvclick-scurl/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (6)Dependencies (2)Versions (8)Used By (1)

SCURL
=====

[](#scurl)

Easy PHP CURL Library

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

[](#installation)

```
composer require srvclick/scurl
```

### IMPORT

[](#import)

```
use Srvclick\Scurl\Scurl_Request as SCURL;
```

### Examples

[](#examples)

#### GET REQUEST

[](#get-request)

```
$curl = new SCURL;
$curl->setUrl('https://example.com');
$response = $curl->Send();
echo $response->getBody();
```

#### POST REQUEST

[](#post-request)

```
$curl->setMethod("POST");
$curl->setParameters([
    'user' => 'user',
    'password' => 'password',
]);
```

### Custom Method

[](#custom-method)

```
$curl->setConfigs([
    'custom_method' => 'PUT'
])
```

#### SET PROXY

[](#set-proxy)

###### WITHOUT AUTH

[](#without-auth)

```
$curl->setProxy([
    'proxy' => '127.0.0.1',
    'proxy_port' => '9090'
]);
```

###### WITH AUTH

[](#with-auth)

```
$curl->setProxy([
    'proxy' => '127.0.0.1',
    'proxy_port' => '9090',
    'proy_user' => 'root',
    'proxy_pass' => 'toor'
]);
```

### SET USER-AGENT

[](#set-user-agent)

###### Option 1

[](#option-1)

```
$curl->setConfigs([
    'user-agent' => 'Mozilla'
])
```

###### Option 2

[](#option-2)

```
$curl->setHeaders([
    'user-agent: Mozilla'
])
```

#### SSL VERIFY PEER

[](#ssl-verify-peer)

```
$curl->setConfigs([
    'ssl_verifypeer' => 'false'
]);
```

#### USE COOKIES

[](#use-cookies)

```
$curl->useCookie(true);
$curl->setCookieName('Random Cookie Name');
```

#### DOWNLOAD FILES

[](#download-files)

```
$curl->downloadFile("/path/","filename.ext");
```

#### INTERCEPT COOKIES

[](#intercept-cookies)

```
$curl->setInterceptCookie(true);
$responseCookies = $response->getResponseCoookies(); //Array
```

#### AVAILABLE CONFIGURATIONS

[](#available-configurations)

```
$curl->setConfigs([
    'use_proxy' => true,
    'max_redirs' => 10,
    'timeout' => 30,
    'http_version' => CURL_HTTP_VERSION_1_1,
    'return_transfer' => true,
    'ssl_verifypeer' => true,
    'follow' => false,
    'encondig' => "",
    'user-agent' => 'SCURL by SrvClick',
    'header' => [],
    'http_auth' => true,
    'http_user' => 'admin',
    'http_pass' => 'admin'
]);
```

#### MULTI CURL SUPPORT

[](#multi-curl-support)

```
$curl = new SCURL();
$curl->setMulticurl();
for ($i = 0; $i < 10; $i++) {
    $curl->MultiUrl('https://jsonplaceholder.typicode.com/todos/'.$i);
    $curl->downloadFile(__DIR__."/downloads/","item_".$i.".json");
}
$response = $curl->Send();
for ($i = 0; $i < $response->getCount(); $i++) {
    echo "Peticion ".$i." Con HTTP STATUS ".$response->getStatus($i)."\n";
}
```

### NIP SUPPORT

[](#nip-support)

```
$curl->NipSetRange($core, $limit);
$curl->NipMultiUrl('https://example.com/nip');
$curl->NipSetParams(function($nip){
        return ['otp' => str_pad($nip ,4,0,STR_PAD_LEFT)];
        //return '{"nip":"'.str_pad($nip ,4,0,STR_PAD_LEFT).'"}'; //Example 2
    }
$response = $curl->Send();

if($response->checkNip(function ($response) {
    $decode = json_decode($response,true);
    if ($decode['success'] == "yes") return true;
    return false;
})){
    echo "NIP: ".$response->getNip()."\n";
}else{
    echo "Nip not found\n";
}
);
```

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity54

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

Recently: every ~44 days

Total

6

Last Release

532d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/83abdba3404e1ac1d6d9def8bf81511f02892eee6d7250280de42cd1b98ef6cb?d=identicon)[SrvClick](/maintainers/SrvClick)

---

Top Contributors

[![SrvClick](https://avatars.githubusercontent.com/u/91323399?v=4)](https://github.com/SrvClick "SrvClick (20 commits)")

### Embed Badge

![Health badge](/badges/srvclick-scurl/health.svg)

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

###  Alternatives

[shopify/shopify-api

Shopify API Library for PHP

4634.8M16](/packages/shopify-shopify-api)[launchdarkly/server-sdk

Official LaunchDarkly SDK for PHP

3810.2M11](/packages/launchdarkly-server-sdk)[launchdarkly/launchdarkly-php

Official LaunchDarkly SDK for PHP

392.0M4](/packages/launchdarkly-launchdarkly-php)[qandidate/stack-request-id

Middleware for adding request id to Symfony Request.

47576.3k3](/packages/qandidate-stack-request-id)[valga/fbns-react

A PHP client for the FBNS built on top of ReactPHP

15751.3k19](/packages/valga-fbns-react)[linkeys/signed-url

Enhanced signed URLs for Laravel, including attaching data, click limits and expiry.

2259.6k1](/packages/linkeys-signed-url)

PHPackages © 2026

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