PHPackages                             alexkratky/requestx - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. alexkratky/requestx

ActiveLibrary[HTTP &amp; Networking](/categories/http)

alexkratky/requestx
===================

Class to work with HTTP requests and HTTP methods.

v1.0.0(6y ago)0444BSDPHPPHP &gt;=7.0

Since Sep 13Pushed 6y ago1 watchersCompare

[ Source](https://github.com/AlexKratky/RequestX)[ Packagist](https://packagist.org/packages/alexkratky/requestx)[ Docs](https://panx.eu/)[ RSS](/packages/alexkratky-requestx/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (1)Versions (5)Used By (4)

Request
=======

[](#request)

Class to work with HTTP requests.

### Installation

[](#installation)

`composer require alexkratky/RequestX`

### Functions

[](#functions)

The class have following functions:

- `getUrl(): URL` - Returns URL object.
- `getQuery(string $key = null)` - Returns variable provided to the script via URL query ($\_GET). If no key is passed, returns the entire array. If key does not exists, returns null.
- `getPost(string $key = null)` - Returns variable provided to the script via POST method ($\_POST). If no key is passed, returns the entire array.
- `getHeader(string $header): ?string` - Return the value of the HTTP header. Pass the header name as the plain, HTTP-specified header name (e.g. 'Accept-Encoding').
- `getHeaders(): array` - Returns all HTTP headers.
- `getReferer(): ?string` - Returns referrer.
- `isSecured(): bool` - Is the request over HTTPS?
- `isAjax(): bool` - Is AJAX request?
- `getRemoteAddress(): ?string` - Returns the IP address of the remote client.
- `detectLanguage(array $langs): ?string` - Parse Accept-Language header and returns preferred language.
- `getMostPreferredLanguage(): ?string` - Return most preferred language.
- `getClientID()` - Return clients Unique ID.
- `workWith(string $method, array $vars): bool` - Checks if are all of $vars isset(). The $method is GET ($\_GET) or POST ($\_POST)

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity56

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

Total

3

Last Release

2190d ago

Major Versions

v0.2.0 → v1.0.02020-05-14

### Community

Maintainers

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

---

Top Contributors

[![AlexKratky](https://avatars.githubusercontent.com/u/33813757?v=4)](https://github.com/AlexKratky "AlexKratky (2 commits)")

---

Tags

httprequestphp

### Embed Badge

![Health badge](/badges/alexkratky-requestx/health.svg)

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

PHPackages © 2026

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