Skip to content
This repository was archived by the owner on Jul 31, 2022. It is now read-only.

Commit adb8c35

Browse files
committed
Last update before archiving
1 parent d59505b commit adb8c35

File tree

7 files changed

+89
-134
lines changed

7 files changed

+89
-134
lines changed

.gitattributes

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1+
/.github export-ignore
12
/tests export-ignore
3+
/docs export-ignore
24
CHANGELOG.md export-ignore
3-
README.md export-ignore
4-
README-ES.md export-ignore
55
phpcs.xml export-ignore
66
phpunit.xml export-ignore
77
phpmd.xml export-ignore
8-
.travis.yml export-ignore
9-
.editorconfig export-ignore
8+
phpdoc.xml export-ignore
109
.gitattributes export-ignore
1110
.gitignore export-ignore
12-
.php_cs.dist export-ignore
13-
CONDUCT.md export-ignore
11+
.php-cs-fixer.dist.php export-ignore

.github/FUNDING.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
github: [Josantonius]

.gitignore

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
.git*/
21
vendor/
3-
docs/*.pyc
4-
docs/_build
5-
build/artifacts/
2+
coverage/
3+
.vscode/
4+
docs/cache/
65
composer.phar
76
composer.lock
87
composer-test.lock
98
phpcbf-fixed.diff
10-
.idea
11-
.DS_STORE
12-
.php_cs.cache
9+
.php_cs.cache
10+
php-ip.code-workspace
11+
.repository.md
12+
.phpunit.result.cache
13+
coverage.xml

CHANGELOG.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# CHANGELOG
22

3+
## 1.1.8 - 2022-07-30
4+
5+
The repository was archived.
6+
7+
>After reviewing the code after a few years, I would not recommend the use of the class for a
8+
>production site, as preference was given to headers easily manipulated by the user to get the IP.
9+
10+
>If the reliability of the header from which the IP will be obtained is not guaranteed,
11+
>it is better to use $_SERVER['REMOTE_ADDR'] directly or develop a custom solution.
12+
313
## 1.1.7 - 2018-01-06
414

515
* The tests were fixed.
@@ -43,7 +53,7 @@
4353
* Unit tests supported by `PHPUnit` were added.
4454

4555
* The repository was synchronized with Travis CI to implement continuous integration.
46-
56+
4757
* Added `Ip/src/bootstrap.php` file
4858

4959
* Added `Ip/tests/bootstrap.php` file.

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
The MIT License (MIT)
22
=====================
33

4-
Copyright (c) `2017 - 2018` `Josantonius, https://josantonius.com <hello@josantonius.com>`
4+
Copyright (c) 2017-2022, Josantonius
55

66
Permission is hereby granted, free of charge, to any person obtaining a copy of
77
this software and associated documentation files (the "Software"), to deal in

README-ES.md

Lines changed: 33 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
11
# PHP Ip library
22

3-
[![Latest Stable Version](https://poser.pugx.org/josantonius/Ip/v/stable)](https://packagist.org/packages/josantonius/Ip) [![Latest Unstable Version](https://poser.pugx.org/josantonius/Ip/v/unstable)](https://packagist.org/packages/josantonius/Ip) [![License](https://poser.pugx.org/josantonius/Ip/license)](LICENSE) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/9a38ca1727464eb2bbac06a1bb163bce)](https://www.codacy.com/app/Josantonius/PHP-Ip?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Josantonius/PHP-Ip&amp;utm_campaign=Badge_Grade) [![Total Downloads](https://poser.pugx.org/josantonius/Ip/downloads)](https://packagist.org/packages/josantonius/Ip) [![Travis](https://travis-ci.org/Josantonius/PHP-Ip.svg)](https://travis-ci.org/Josantonius/PHP-Ip) [![PSR2](https://img.shields.io/badge/PSR-2-1abc9c.svg)](http://www.php-fig.org/psr/psr-2/) [![PSR4](https://img.shields.io/badge/PSR-4-9b59b6.svg)](http://www.php-fig.org/psr/psr-4/) [![CodeCov](https://codecov.io/gh/Josantonius/PHP-Ip/branch/master/graph/badge.svg)](https://codecov.io/gh/Josantonius/PHP-Ip)
3+
[![Latest Stable Version](https://poser.pugx.org/josantonius/Ip/v/stable)](https://packagist.org/packages/josantonius/Ip)
4+
[![License](https://poser.pugx.org/josantonius/Ip/license)](LICENSE)
45

56
[English version](README.md)
67

78
Biblioteca PHP para obtener la IP del usuario.
89

10+
>Tras revisar el código después de unos años, no recomendaría el uso de la clase para un sitio en
11+
>producción, ya que se dio preferencia a cabeceras fácilmente manipulables por el usuario para
12+
>obtener la IP.
13+
14+
>Si la fiabilidad de la cabecera desde la que se obtendrá la IP no está garantizada, sería
15+
>mejor utilizar $_SERVER['REMOTE_ADDR'] directamente o desarrollar una solución personalizada.
16+
917
---
1018

1119
- [Requisitos](#requisitos)
@@ -14,53 +22,50 @@ Biblioteca PHP para obtener la IP del usuario.
1422
- [Cómo empezar](#cómo-empezar)
1523
- [Uso](#uso)
1624
- [Tests](#tests)
17-
- [Tareas pendientes](#-tareas-pendientes)
18-
- [Contribuir](#contribuir)
19-
- [Repositorio](#repositorio)
25+
- [Patrocinar](#patrocinar)
2026
- [Licencia](#licencia)
21-
- [Copyright](#copyright)
2227

2328
---
2429

2530
## Requisitos
2631

2732
Esta clase es soportada por versiones de **PHP 5.6** o superiores y es compatible con versiones de **HHVM 3.0** o superiores.
2833

29-
## Instalación
34+
## Instalación
3035

3136
La mejor forma de instalar esta extensión es a través de [Composer](http://getcomposer.org/download/).
3237

3338
Para instalar **PHP Ip library**, simplemente escribe:
3439

35-
$ composer require Josantonius/Ip
40+
composer require Josantonius/Ip
3641

3742
El comando anterior sólo instalará los archivos necesarios, si prefieres **descargar todo el código fuente** puedes utilizar:
3843

39-
$ composer require Josantonius/Ip --prefer-source
44+
composer require Josantonius/Ip --prefer-source
4045

4146
También puedes **clonar el repositorio** completo con Git:
4247

43-
$ git clone https://github.com/Josantonius/PHP-Ip.git
48+
$ git clone <https://github.com/Josantonius/PHP-Ip.git>
4449

4550
O **instalarlo manualmente**:
4651

4752
[Descargar Ip.php](https://raw.githubusercontent.com/Josantonius/PHP-Ip/master/src/Ip.php):
4853

49-
$ wget https://raw.githubusercontent.com/Josantonius/PHP-Ip/master/src/Ip.php
54+
wget https://raw.githubusercontent.com/Josantonius/PHP-Ip/master/src/Ip.php
5055

5156
## Métodos disponibles
5257

5358
Métodos disponibles en esta biblioteca:
5459

55-
### - Obtener IP del usuario:
60+
### - Obtener IP del usuario
5661

5762
```php
5863
Ip::get();
5964
```
6065

6166
**# Return** (string|false) → IP o falso
6267

63-
### - Validar IP:
68+
### - Validar IP
6469

6570
```php
6671
Ip::validate($ip);
@@ -94,86 +99,54 @@ use Josantonius\Ip\Ip;
9499

95100
Ejemplo de uso para esta biblioteca:
96101

97-
### - Obtener IP del usuario:
102+
### - Obtener IP del usuario
98103

99104
```php
100105
Ip::get();
101106
```
102107

103-
### - Validar IP:
108+
### - Validar IP
104109

105110
```php
106111
$ip = Ip::get();
107112

108113
Ip::validate($ip);
109114
```
110115

111-
## Tests
116+
## Tests
112117

113118
Para ejecutar las [pruebas](tests) necesitarás [Composer](http://getcomposer.org/download/) y seguir los siguientes pasos:
114119

115-
$ git clone https://github.com/Josantonius/PHP-Ip.git
120+
git clone https://github.com/Josantonius/PHP-Ip.git
116121

117-
$ cd PHP-Ip
122+
cd PHP-Ip
118123

119-
$ composer install
124+
composer install
120125

121126
Ejecutar pruebas unitarias con [PHPUnit](https://phpunit.de/):
122127

123-
$ composer phpunit
128+
composer phpunit
124129

125130
Ejecutar pruebas de estándares de código [PSR2](http://www.php-fig.org/psr/psr-2/) con [PHPCS](https://github.com/squizlabs/PHP_CodeSniffer):
126131

127-
$ composer phpcs
132+
composer phpcs
128133

129134
Ejecutar pruebas con [PHP Mess Detector](https://phpmd.org/) para detectar inconsistencias en el estilo de codificación:
130135

131-
$ composer phpmd
136+
composer phpmd
132137

133138
Ejecutar todas las pruebas anteriores:
134139

135-
$ composer tests
136-
137-
## ☑ Tareas pendientes
138-
139-
- [ ] Añadir nueva funcionalidad.
140-
- [ ] Mejorar pruebas.
141-
- [ ] Mejorar documentación.
142-
- [ ] Refactorizar código para las reglas de estilo de código deshabilitadas. Ver [phpmd.xml](phpmd.xml) y [.php_cs.dist](.php_cs.dist).
143-
144-
## Contribuir
145-
146-
Si deseas colaborar, puedes echar un vistazo a la lista de
147-
[issues](https://github.com/Josantonius/PHP-Ip/issues) o [tareas pendientes](#-tareas-pendientes).
148-
149-
**Pull requests**
140+
composer tests
150141

151-
* [Fork and clone](https://help.github.com/articles/fork-a-repo).
152-
* Ejecuta el comando `composer install` para instalar dependencias.
153-
Esto también instalará las [dependencias de desarrollo](https://getcomposer.org/doc/03-cli.md#install).
154-
* Ejecuta el comando `composer fix` para estandarizar el código.
155-
* Ejecuta las [pruebas](#tests).
156-
* Crea una nueva rama (**branch**), **commit**, **push** y envíame un
157-
[pull request](https://help.github.com/articles/using-pull-requests).
142+
## Patrocinar
158143

159-
**¡Gracias a quienes ya habéis contribuido a este proyecto!**
160-
161-
[<img alt="MASNathan" src="https://avatars0.githubusercontent.com/u/2139464?v=4&s=117 width=117" height="117" width="117">](https://github.com/MASNathan) |
162-
:---:|
163-
[MASNathan](https://github.com/MASNathan)|
164-
165-
## Repositorio
166-
167-
La estructura de archivos de este repositorio se creó con [PHP-Skeleton](https://github.com/Josantonius/PHP-Skeleton).
144+
Si este proyecto te ayuda a reducir el tiempo de desarrollo,
145+
[puedes patrocinarme](https://github.com/josantonius/lang/es-ES/README.md#patrocinar)
146+
para apoyar mi trabajo :blush:
168147

169148
## Licencia
170149

171-
Este proyecto está licenciado bajo **licencia MIT**. Consulta el archivo [LICENSE](LICENSE) para más información.
172-
173-
## Copyright
174-
175-
2017 - 2018 Josantonius, [josantonius.com](https://josantonius.com/)
176-
177-
Si te ha resultado útil, házmelo saber :wink:
150+
Este repositorio tiene una licencia [MIT License](LICENSE).
178151

179-
Puedes contactarme en [Twitter](https://twitter.com/Josantonius) o a través de mi [correo electrónico](mailto:hello@josantonius.com).
152+
Copyright © 2017-2022, [Josantonius](https://github.com/josantonius/lang/es-ES/README.md#contacto)

0 commit comments

Comments
 (0)