PHP Classes

How to Use a Laravel IP Address Facade Class to Query an API to Get Details About IP Addresses Using the Package WhoAmI: Get IP address information using the WhoAmI API

Recommend this page to a friend!
  Info   Documentation   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2024-07-02 (2 months ago) RSS 2.0 feedNot yet rated by the usersTotal: 37 All time: 10,950 This week: 39Up
Version License PHP version Categories
whoami 1.0.0The PHP License5Networking, PHP 5, Web services, Desi...
Description 

Author

This package can get IP address information using the WhoAmI API.

It provides a facade that Laravel applications can use to send HTTP requests to the WhoAmI API.

Currently, the facade can be used to send requests to:

- Request information about a given IP address

- Set request filter parameters

- Get WhoAmI API responses as objects

Innovation Award
PHP Programming Innovation award winner
July 2024
Winner
Laravel is a popular PHP framework that implements the concept of facades.

This possibility of the Laravel framework allows developers to quickly implement classes that can access functions of other classes as if they were static.

This way, facade classes simplify the code developers write to implement their applications using those facade classes.

This package implements a Laravel facade to access a Web services API to query information about IP addresses.

Manuel Lemos
Picture of Hicri
  Performance   Level  
Name: Hicri <contact>
Classes: 26 packages by
Country: Turkey Turkey
Age: 30
All time rank: 290948 in Turkey Turkey
Week rank: 193 Up5 in Turkey Turkey Up
Innovation award
Innovation award
Nominee: 4x

Winner: 1x

Documentation

slvler - Ip-api Service

Latest Stable Version Latest Unstable Version License

This package provides a convenient wrapper to the Ip API for Laravel applications.

Requirements

  • PHP 8.0+
  • Laravel 10.x

Installation

To install this package tou can use composer:

    composer require slvler/whoami

Usage

Import the facade in your class.

use Whoami;

send a request to get ip information details

Whoami::get("46.2.138.34")->result();

send a request to filter some details in the ip information

Whoami::get("46.2.138.34")->filter(['status','message','country','zip','query'])->result();

Credits


  Files folder image Files (10)  
File Role Description
Files folder imagesrc (3 files, 2 directories)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE.md Lic. License text
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files (10)  /  src  
File Role Description
Files folder imageApi (3 files)
Files folder imageFacades (1 file)
  Plain text file Whoami.php Class Class source
  Plain text file WhoamiManager.php Class Class source
  Plain text file WhoamiServiceProvider.php Class Class source

  Files folder image Files (10)  /  src  /  Api  
File Role Description
  Plain text file IWhoami.php Class Class source
  Plain text file WhoamiClient.php Class Class source
  Plain text file WhoamiHttpResponse.php Class Class source

  Files folder image Files (10)  /  src  /  Facades  
File Role Description
  Plain text file WhoamiFacade.php Class Class source

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:37
This week:0
All time:10,950
This week:39Up