
, (*1)
Ce package vous permet de récupérer facilement les informations sur une adresse IP renseignée.
Ce développement parse le XML., (*2)
ATTENTION : L'UTILISATION GRATUITE PERMET DE REALISER 150 REQUETES PAR MINUTE !, (*3)
Requis
PHP5 et Carbon, (*4)
Composer
Je vous conseille vivement l'utilisation de Composer.
Vous pouvez ajouter ce package en tapant la commande suivante dans votre terminal :, (*5)
composer require rypsx/ipapi
Ou en éditant le fichier composer.json, tel que :, (*6)
{
"require": {
"rypsx/ipapi": "^1.0"
}
English Version
This package allows you to easily retrieve information about an IP address filled.
This development parse XML., (*7)
WARNING: FREE USE PERMITS TO MAKE 150 QUERIES PER MINUTE ONLY !, (*8)
Usage Example / Utilisation
getMessage();
}
var_dump($ipapi);
?>
Required
PHP5 and Carbon, (*9)
Composer
I highly recommend the use of Composer.
You can add this package by typing the following command in your terminal:, (*10)
composer require rypsx/ipapi
Or by editing the composer.json file, such as:, (*11)
{
"require": {
"rypsx/ipapi": "^1.0"
}
Packagist
Packagist Repo URL, (*12)
Output example / Example de retour
The following IP adress was taken from IP-API.COM website, (*13)
object(Rypsx\Ipapi\Ipapi)[3]
public 'erreur' => null
public 'date' => string '2016-08-07 12:01:16' (length=19)
public 'ipAdr' => string '208.80.152.201' (length=14)
public 'ip2long' => int -800024375
public 'ipapi' =>
object(Rypsx\Ipapi\IpRequest)[4]
public 'erreur' =>
array (size=0)
empty
public 'status' => string 'success' (length=7)
public 'pays' => string 'United States' (length=13)
public 'paysCode' => string 'US' (length=2)
public 'region' => string 'California' (length=10)
public 'ville' => string 'San Francisco' (length=13)
public 'cp' => string '94105' (length=5)
public 'latitude' => string '37.7898' (length=7)
public 'longitude' => string '-122.3942' (length=9)
public 'timezone' => string 'America/Los_Angeles' (length=19)
public 'isp' => string 'Wikimedia Foundation' (length=20)
License
The MIT License (MIT), (*14)
Copyright (c) 2016 RypsX Dev, (*15)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:, (*16)
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software., (*17)
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE., (*18)