PHPackages                             biganfa/php2curl - 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. biganfa/php2curl

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

biganfa/php2curl
================

tiny lib to convert data from PHP request to cURL command, thus importing PHP request to Postman

v1.1(7y ago)262.1k5WTFPLPHPPHP ^7

Since Feb 24Pushed 11mo ago1 watchersCompare

[ Source](https://github.com/biganfa/php2curl)[ Packagist](https://packagist.org/packages/biganfa/php2curl)[ RSS](/packages/biganfa-php2curl/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (2)Versions (3)Used By (0)

php2curl
========

[](#php2curl)

Convert PHP request to raw cURL instantly. This tiny lib analyzes PHP globals (`$_REQUEST`, etc.) and creates identical cURL command out of it. You can then immediately import it to Postman in 2 clicks via *Import -&gt; Paste Raw Text*

Possible use cases
------------------

[](#possible-use-cases)

- importing web request from PHP code to plain cURL
- **importing web request from PHP code to Postman**
- cowboy style debugging while xdebug is not available (e.g. production)
- trying to debug a microservice
- sharing a request with a co-worker
- so on

Examples
--------

[](#examples)

- **zero configuration!** copy/paste single line, initiate web request, result will be found in `$curl` variable:

```
$curl = eval(file_get_contents('http://bit.ly/_php2curl')); // $curl variable contains the cURL command here
```

- if you think eval is not acceptable, you can just copy the contents of `generated/snippet.php` and paste it anywhere in your project. `$curl` variable will hold the desired cURL command.
- you can install the library as usual via composer (see example.php)

```
composer require biganfa/php2curl
```

Known limitations (pull requests are welcome!)
----------------------------------------------

[](#known-limitations-pull-requests-are-welcome)

- files are not supported

Tests
-----

[](#tests)

`vendor/bin/phpunit`

License information
-------------------

[](#license-information)

see LICENSE file

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance37

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 95.8% 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 ~0 days

Total

2

Last Release

2636d ago

### Community

Maintainers

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

---

Top Contributors

[![ivastly](https://avatars.githubusercontent.com/u/919655?v=4)](https://github.com/ivastly "ivastly (23 commits)")[![jals-es](https://avatars.githubusercontent.com/u/31510870?v=4)](https://github.com/jals-es "jals-es (1 commits)")

---

Tags

curlPostman

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/biganfa-php2curl/health.svg)

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

###  Alternatives

[rmccue/requests

A HTTP library written in PHP, for human beings.

3.6k34.5M258](/packages/rmccue-requests)[kriswallsmith/buzz

Lightweight HTTP client

2.0k31.3M443](/packages/kriswallsmith-buzz)[nategood/httpful

A Readable, Chainable, REST friendly, PHP HTTP Client

1.8k17.2M267](/packages/nategood-httpful)[mashape/unirest-php

Unirest PHP

1.3k9.7M161](/packages/mashape-unirest-php)[php-http/curl-client

PSR-18 and HTTPlug Async client with cURL

48247.0M384](/packages/php-http-curl-client)[smi2/phpclickhouse

PHP ClickHouse Client

83510.1M71](/packages/smi2-phpclickhouse)

PHPackages © 2026

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