PHPackages                             mashinamashina/request - 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. mashinamashina/request

ActiveLibrary

mashinamashina/request
======================

Simply http querys in php

v1.3(5y ago)4111MITPHP

Since Jul 29Pushed 5y agoCompare

[ Source](https://github.com/MashinaMashina/request)[ Packagist](https://packagist.org/packages/mashinamashina/request)[ RSS](/packages/mashinamashina-request/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (5)Used By (0)

request
=======

[](#request)

- request class - PHP надстройка над CURL, упрощающая жизнь разработчику

Самый простой пример:

```
use MashinaMashina\Request\Request;

$request = new Request('https://github.com');
$request->send();

echo $request->response;
```

Методы:

- request::\_\_construct($url) - устанавливает URL запроса
- request::set($key, $value) - Устанавливает параметр CURL. [Описание параметров](http://php.net/manual/ru/function.curl-setopt.php)
- request::session($directory) - Устанавливает папку для хранения временных файлов сессии.
- request::post($data = array()) - устанавливает передаваемые данные и тип запроса в POST
- request::payload($data) - устанавливает тип запроса POST, данные кодирует в JSON [Можно чуть-чуть почитать тут](https://stackoverflow.com/questions/23118249/whats-the-difference-between-request-payload-vs-form-data-as-seen-in-chrome)
- request::send() - отправляет запрос. Возвращает содержимое страницы запроса
- request::error() - проверяет наличие ошибок. Если их нет возвращает False, иначе описание ошибки
- request::get\_charset() - возвращает кодировку. Метод пытается определить кодировку:
    1. В заголовках
    2. В теле страницы
    3. С момощью mb\_detect\_encoding()
- request::dump() - возвращает полное описание запроса

Примеры:

```
use MashinaMashina\Request\Request;

$request = new Request('http://google.com');
$request->session('google');
$request->send();

if( $request->error())
{
  echo $request->dump();
  die();
}
```

```
$data = array(
  'login' => 'Vasya',
  'passwd' => '12345'
);

$request = new Request('http://example.com');
$request->post($data);
$request->send();

echo $request->response;
```

```
$data = array(
  'auth' => array(
    'login' => 'Vasya',
    'passwd' => '12345'
  ),
  'order' => array(
    'id' => 1
  )
);

$request = new Request('http://example.com');
$request->payload($data);
$request->send();

echo $request->response;
```

Установка:
==========

[](#установка)

```
composer require mashinamashina/request

```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

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

Total

4

Last Release

2110d ago

### Community

Maintainers

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

---

Top Contributors

[![MashinaMashina](https://avatars.githubusercontent.com/u/31430016?v=4)](https://github.com/MashinaMashina "MashinaMashina (28 commits)")

### Embed Badge

![Health badge](/badges/mashinamashina-request/health.svg)

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

PHPackages © 2026

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