PHPackages                             mjy191/my-curl - 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. mjy191/my-curl

ActiveLibrary

mjy191/my-curl
==============

curl请求，记录请求日志

1.0.1(3y ago)01.3k↓100%MITPHP

Since Sep 13Pushed 3y ago1 watchersCompare

[ Source](https://github.com/mjy191/my-curl)[ Packagist](https://packagist.org/packages/mjy191/my-curl)[ RSS](/packages/mjy191-my-curl/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (2)Versions (3)Used By (0)

1.基本介绍
------

[](#1基本介绍)

### 1.1 项目介绍

[](#11-项目介绍)

> 基于laravel框架 curl请求，记录请求日志、返回数据日志，错误日志

### 1.2 配置

[](#12-配置)

新建app/Exceptions/ApiException.php 捕获ApiException抛出的异常进行处理

```
namespace App\Exceptions;

use Mjy191\Tools\Tools;
use Exception;

class ApiException extends Exception
{
    /**
     * 转换异常为 HTTP 响应
     *
     * @param \Illuminate\Http\Request
     * @return \Illuminate\Http\Response
     */
    public function render($request)
    {
        return response()->json(Tools::returnData(null,$this->getCode(),$this->getMessage()))->setEncodingOptions(JSON_UNESCAPED_UNICODE);
    }
}

```

1.3 请求日志查询
----------

[](#13-请求日志查询)

日志均保存在logs目录下 通过logid aaaaaa 查询

```
grep aaaaaa *
2082207.log:2022-08-22 07:24:50 uri[/api/order/payInfo?sign=xxx] logid[aaaaaa] curl[url[https://api.mch.weixin.qq.com/v3/pay/transactions/jsapi] method[post] params[{"appid":"xxx","mchid":"xxx","description":"xxxx","out_trade_no":"testxxx","notify_url":"https:\/\/xxx.xxx.com\/api\/wx\/paynotify\/111111","amount":{"total":9000},"payer":{"openid":"xxxxx"}}] header[["Content-Type:application\/json; charset=UTF-8","Accept:application\/json","User-Agent:*\/*","Authorization: WECHATPAY2-SHA256-RSA2048 mchid=\"xxxx\",serial_no=\"xxxxx\",nonce_str=\"xxxx\",timestamp=\"xxxx\",signature=\"xxxxx\""]]]
2022082207.log:2022-08-22 07:24:50 uri[/api/order/payInfo?sign=xxx] logid[aaaaaa] curl response[{"prepay_id":"xxxxxxxxx"}]
2022082207.log:2022-08-22 07:24:50 uri[/api/order/payInfo?sign=xxx] logid[aaaaaa] response[{"code":1,"msg":"success","data":{"appId":"xxxx","timeStamp":"xxxx","nonceStr":"xxxxxx","package":"prepay_id=xxxxx","signType":"RSA","paySign":"xxxx"},"timestamp":xxxx}]

```

### 1.4 安装

[](#14-安装)

```
composer require mjy191/my-curl

```

###  Health Score

25

—

LowBetter than 40% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity47

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

Total

2

Last Release

1147d ago

### Community

Maintainers

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

---

Top Contributors

[![mjy191](https://avatars.githubusercontent.com/u/16607888?v=4)](https://github.com/mjy191 "mjy191 (7 commits)")

### Embed Badge

![Health badge](/badges/mjy191-my-curl/health.svg)

```
[![Health](https://phpackages.com/badges/mjy191-my-curl/health.svg)](https://phpackages.com/packages/mjy191-my-curl)
```

PHPackages © 2026

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