marius321967/php-curl-class 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

marius321967/php-curl-class

最新稳定版本:4.0.0

Composer 安装命令:

composer require marius321967/php-curl-class

包简介

PHP Curl Class is an object-oriented wrapper of the PHP cURL extension.

README 文档

README

PHP Curl Class that makes use of PHP interfaces.

Changes

MultiCurl's addGet, addPost, etc. calls changed to get, post and so on.

Regular Curl

// Our response.
$response = null;

// Single Curl request object.
$curl = new Curl();

// Bind success callback.
$curl->success(function($curl) use (&$response) {
    $response = $curl->response;
});

// Send the request.
$curl->get('http://example.com/');

echo $response;

Async Curl

// Our response.
$response = null;

// Async Curl handler.
$multiCurl = new MultiCurl();

// Add a get request to the queue, it returns the single request object.
$curl = $multiCurl->get('http://example.com/');

// Bind success callback.
$curl->success(function($curl) use (&$response) {
    $response = $curl->response;
});

// Execute all requests in the queue.
$multiCurl->start();

echo $response;

Notes

For other features, read the Original Package documentation.

统计信息

  • 总下载量: 14
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 674
  • 开发语言: PHP

其他信息

  • 授权协议: Unlicense
  • 更新时间: 2015-08-22

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固