shintio/yii2-proxy-httpclient

Native httpclient with custom or autoparsed free proxy servers

0.1 2018-09-27 23:05 UTC

This package is not auto-updated.

Last update: 2024-04-21 01:52:34 UTC


README

Native httpclient with custom or autoparsed free proxy servers

Installation

The preferred way to install this extension is through composer.

Either run

composer require --prefer-dist shintio/yii2-proxy-httpclient "*"

or add

"shintio/yii2-proxy-httpclient": "*"

to the require section of your composer.json file.

Apply migrations by following command:

php yii migrate --migrationPath="vendor/shintio/yii2-proxy-httpclient/src/database/migrations/"

Usage

Once the extension is installed, simply use it in your code like:

use shintio\yii2\proxy\components\Client;

$client = new Client();

$request = $client->createRequest()->setMethod('get')->setUrl('https://2ip.ru/');

$response = $request->send();

echo $response->content;
die;