PHPackages                             elmijo/php-cliente-addr - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. elmijo/php-cliente-addr

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

elmijo/php-cliente-addr
=======================

Una pequeña clase para obtener la IP y el HostName del cliente

v3.0(8y ago)01.5k↓50%3MITPHPPHP &gt;=5.3.0

Since Aug 22Pushed 8y ago1 watchersCompare

[ Source](https://github.com/ElMijo/php-cliente-addr)[ Packagist](https://packagist.org/packages/elmijo/php-cliente-addr)[ Docs](https://github.com/ElMijo/php-cliente-addr)[ RSS](/packages/elmijo-php-cliente-addr/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (2)Versions (5)Used By (3)

PHP Cliente Address
===================

[](#php-cliente-address)

[![Build Status](https://camo.githubusercontent.com/d415ad6d52ae91618201b14226000662a0c3f0a12b38a4362103e4f91764ef11/68747470733a2f2f7472617669732d63692e6f72672f456c4d696a6f2f7068702d636c69656e74652d616464722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/ElMijo/php-cliente-addr) [![Coverage Status](https://camo.githubusercontent.com/48ae58e41f8064b8758fd621f49e970963e7dfe1d783a6269e38128654d158e1/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f456c4d696a6f2f7068702d636c69656e74652d616464722f62616467652e737667)](https://coveralls.io/r/ElMijo/php-cliente-addr) [![Scrutinizer Code Quality](https://camo.githubusercontent.com/4515c8168f77228f8af6cd277326167add42405297c6c097c51bfbfce5132ee7/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f456c4d696a6f2f7068702d636c69656e74652d616464722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/ElMijo/php-cliente-addr/?branch=master)

Una pequeña clase para obtener la IP y el HostName del cliente

> **Nota:** No se esta descubriendo el agua tibia.. solo unifique en un solo metodo las propuestas e investigaciones de muchas personas incluyendo las mias.

Instalación
-----------

[](#instalación)

Lo podemos hacer a travéz de [composer](https://getcomposer.org/doc/00-intro.md):

```
    "require": {
        ...
        "elmijo/php-cliente-addr": "2.0"
        ...
    }
```

Ejemplo
-------

[](#ejemplo)

Asi debemos usar la clase:

#### 1.- Incluir la libreria

[](#1--incluir-la-libreria)

```
use PHPTools\PHPClientAddr\PHPClientAddr;
```

#### 2.- Obtener los valores

[](#2--obtener-los-valores)

```
$address = new PHPClientAddr();
echo $address->ip;
echo $address->hostname;
```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity61

Established project with proven stability

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

Total

4

Last Release

2973d ago

Major Versions

1.1 → 2.02015-06-10

2.0 → v3.02018-03-26

PHP version history (2 changes)v1.0PHP &gt;=5.1.3

2.0PHP &gt;=5.3.0

### Community

Maintainers

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

---

Top Contributors

[![elmijo](https://avatars.githubusercontent.com/u/1669346?v=4)](https://github.com/elmijo "elmijo (13 commits)")

---

Tags

hostnameIPREMOTE\_ADDRclienteaddrHTTP\_CLIENT\_IPHTTP\_X\_FORWARDED\_FORHTTP\_X\_FORWARDEDHTTP\_X\_CLUSTER\_CLIENT\_IPHTTP\_FORWARDED\_FORHTTP\_FORWARDED

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/elmijo-php-cliente-addr/health.svg)

```
[![Health](https://phpackages.com/badges/elmijo-php-cliente-addr/health.svg)](https://phpackages.com/packages/elmijo-php-cliente-addr)
```

###  Alternatives

[stevebauman/location

Retrieve a user's location by their IP Address

1.3k7.6M65](/packages/stevebauman-location)[s1lentium/iptools

PHP Library for manipulating network addresses (IPv4 and IPv6)

2446.2M24](/packages/s1lentium-iptools)[zhuzhichao/ip-location-zh

get the ip's location info with Chinese

617212.5k11](/packages/zhuzhichao-ip-location-zh)[markrogoyski/ipv4-subnet-calculator

Network calculator for subnet mask and other classless (CIDR) network information.

177813.7k6](/packages/markrogoyski-ipv4-subnet-calculator)[rlanvin/php-ip

IPv4/IPv6 manipulation library for PHP

180738.8k11](/packages/rlanvin-php-ip)[longman/ip-tools

PHP IP Tools for manipulation with IPv4 and IPv6

147245.6k6](/packages/longman-ip-tools)

PHPackages © 2026

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