glow/guzzler

该软件包已被放弃,不再维护。未建议替代软件包。

HTTP 库的简化包装器

1.9 2018-06-14 13:07 UTC

This package is not auto-updated.

Last update: 2018-06-14 13:08:14 UTC


README

为 Guzzle 5.3 提供简单的 GET 包装器

安装

安装 Glow\Guzzler 的推荐方法是使用 Composer。

composer require glow/guzzler

示例

<?php

$example_guzzler = new Glow\Guzzler\Guzzler;

$example_guzzler->setUserAgent('Some UA');
$example_guzzler->setRequestUrl('http://www.example.com');

//grab the contents
$example_guzzler->getResponseContents();

//grab the status code
$example_guzzler->getStatusCode();

附加信息

要使用此功能,您首先需要一个来自: http://docs.php-http.org/en/latest/clients.html 的客户端。