PHPackages                             enishant/magiccurl - 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. enishant/magiccurl

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

enishant/magiccurl
==================

MagicCurl PHP Library

1.0.0(3y ago)327[1 issues](https://github.com/enishant/magiccurl/issues)MITPHPPHP ~5.5.0|~5.6.0|^7.0|^8.0

Since Jun 3Pushed 2y ago1 watchersCompare

[ Source](https://github.com/enishant/magiccurl)[ Packagist](https://packagist.org/packages/enishant/magiccurl)[ Docs](https://github.com/enishant/magiccurl)[ RSS](/packages/enishant-magiccurl/feed)WikiDiscussions main Synced 5d ago

READMEChangelog (1)DependenciesVersions (4)Used By (0)

MagicCurl PHP Library
=====================

[](#magiccurl-php-library)

[![Stable](https://camo.githubusercontent.com/5a823e95fad1a5a3aac30e4dd0dc3fa7e1e857fcbaf306ee68481d291e160087/68747470733a2f2f706f7365722e707567782e6f72672f656e697368616e742f6d616769636375726c2f76)](https://packagist.org/packages/enishant/magiccurl)[![PHP Version Require](https://camo.githubusercontent.com/8a58e1ef2a52a2dd4fb61e58240063e6f63468f42cc1cd88a77f484939ca453b/687474703a2f2f706f7365722e707567782e6f72672f656e697368616e742f6d616769636375726c2f726571756972652f706870)](https://packagist.org/packages/enishant/magiccurl)[![License](https://camo.githubusercontent.com/bb0f256b5cd11818eacc2116137a8a2c548271b3935dee95c5dadf8579c492e6/68747470733a2f2f706f7365722e707567782e6f72672f656e697368616e742f6d616769636375726c2f6c6963656e7365)](https://packagist.org/packages/enishant/magiccurl)[![Downloads](https://camo.githubusercontent.com/2c376732db2379666154b7c7a6b83425dc3166ef47516881c3773ecca2ca3577/68747470733a2f2f706f7365722e707567782e6f72672f656e697368616e742f6d616769636375726c2f646f776e6c6f616473)](https://packagist.org/packages/enishant/magiccurl)

### Prerequisites

[](#prerequisites)

- A minimum of PHP 7.x upto 8.1
- PHP cURL extension

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

[](#installation)

- If your project using composer, run the below command

```
composer require enishant/magiccurl:1.0
```

- If you are not using composer, download the latest release from [the releases section](https://github.com/enishant/magiccurl/releases). **You should download the `magiccurl.zip` file**. After that, include `MagicCurl.php` in your application and you can use the MagicCurl methods by creating it's instance.

Note: This PHP library follows the following practices:

- Namespaced under `Enishant\MagicCurl`
- Options are passed as an array instead of multiple arguments wherever possible
- All requests and responses are communicated using PHP CURL extension

Basic Usage
-----------

[](#basic-usage)

Instantiate the MagicCurl php instance with/without providing an options.

```
use Enishant\MagicCurl\MagicCurl;

$client = new MagicCurl;
```

### Options

[](#options)

- `create_log` - Creates log for user agent, header, request and response.
- `log_path` - Provide log file path.
- `debug` - Display all php errors.
- `user_agent` - Custom [User Agent](https://en.wikipedia.org/wiki/User_agent) name.

#### Create log file, update onwership &amp; permissions

[](#create-log-file-update-onwership--permissions)

`sudo touch /path/to/magiccurl.log`

`sudo chown www-data:www-data /path/to/magiccurl.log`

`sudo chmod 644 /path/to/magiccurl.log`

```
use Enishant\MagicCurl\MagicCurl;

$options = [
	'create_log' => true,
	'log_path'   => '/path/to/magiccurl.log',
	'debug'      => true,
	'user_agent' => 'MagicCurl/1.0'
];

$client = new MagicCurl( $options );
```

The resources can be accessed via the `$client` object. All the methods invocations follows the following pattern

```
    // $client->function() to access the methods

    //Example - Request with GET method
    $client->get($url);
    $client->get($url, $payload, $headers);

    //Example - Request with POST method
    $headers = [
      'Accept: application/json',
      'Content-Type: application/json',
    ];
    $payload = ['data'=>'in array'];
    $client->post($url, $payload, $headers);
```

Contributing
------------

[](#contributing)

All contributions for enhancement and fixes will be accepted through pull request, you can also contribute by reporting issues, [Click here](https://github.com/enishant/magiccurl/issues/new) to report an issue.

License
-------

[](#license)

The MagicCurl PHP Library is released under the MIT License. See [LICENSE](LICENSE) file for more details.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance13

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

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

Unknown

Total

1

Last Release

1444d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ad90eaddda5ccc0020a1aa2f845520909a02cccd5e01bb49fa7fa316259a9449?d=identicon)[enishant](/maintainers/enishant)

---

Top Contributors

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

---

Tags

curlgetget-requesthacktoberfesthacktoberfest2022jsonmagiccurlphpphp-librarypostpost-requestrequestrequestsresponseresponsesresponserequestcurlrequestsresponsesmagiccurlget requestpost request

### Embed Badge

![Health badge](/badges/enishant-magiccurl/health.svg)

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

###  Alternatives

[guzzlehttp/psr7

PSR-7 message implementation that also provides common utility methods

8.0k1.0B3.2k](/packages/guzzlehttp-psr7)[psr/http-message

Common interface for HTTP messages

7.1k1.0B5.5k](/packages/psr-http-message)[psr/http-factory

PSR-17: Common interfaces for PSR-7 HTTP message factories

1.9k692.9M1.9k](/packages/psr-http-factory)[fig/http-message-util

Utility classes and constants for use with PSR-7 (psr/http-message)

39489.0M274](/packages/fig-http-message-util)[nette/http

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

48619.2M541](/packages/nette-http)[aplus/http-client

Aplus Framework HTTP Client Library

2161.6M1](/packages/aplus-http-client)

PHPackages © 2026

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