Download the PHP package bytes4sale/iplocator without Composer

On this page you can find all versions of the php package bytes4sale/iplocator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package iplocator

IPLocator Laravel Package

Introduction

Welcome to IPLocator, a powerful Laravel package that provides easy-to-use functionality for retrieving detailed information about IP addresses. With this package, you can effortlessly obtain essential details like location, currency, language, and more for any given IP address.

Features

Requirements

Installation

You can install the IPLocator package via Composer. Run the following command in your terminal:

Prerequisites

Before using IPLocator, you need to sign up for an API key from the IP data providers you wish to use. IPLocator currently supports the following IP data providers, each offering different sets of information. So key is required to access their API to fetch IP information

  1. IPDATA : You can register and obtain your API key by visiting their website at https://www.ipdata.co.
  2. IPSTACK : You can register and obtain your API key by visiting their website at https://ipstack.com.

Configuration

Before using the IPLocator package, you need to set your API key and API Source in the .env file of your Laravel project.

  1. Open your Laravel project's root directory.
  2. Create or modify the .env file and add:

Usage

Getting information for an IP address is a breeze with IPLocator. Simply follow these steps:

  1. Initialize IPLocator: Before using the package, make sure to initialize it. You can do this by adding the ServiceProvider to the config/app.php file:

    php use bytes4sale\iplocator\Facades\IPLocator;

    // Get information for an IP address $ipAddress = '203.0.113.0'; $response = IPLocator::getIpCompleteDetails($ipAddress); if ($response->isSuccessful()) { print_r($response->getTodayRequestCount());

    } else {
        print_r($response->getErrorResponse();
    }

    Configuration

IPLocator allows you to customize its behavior by publishing its configuration file. To do this, run the following artisan command:

After running the command, you will find the configuration file at config/iplocator.php. You can modify the settings as per your needs.

Advanced Settings

If you want to save the API keys in the database, you can use the IpLocatorConfig::setCredentials(["key" => "123"]) function to set the API key. Make sure the array key should be "key".

This allows you to securely store and manage your API keys within your application's database, providing a more flexible and configurable way to use the IpLocator package.

Available Methods

Method Description
IPLocator::getStatusCode() Get the status code receiving from the IP Address.
IPLocator::getContent() Get the complete data about IP Address.
IPLocator::isSuccessful() Get the status of request either succeed or not.
IPLocator::getCarrierDetails() Get Mobile Carrier details of an IP Address.
IPLocator::getErrorResponse() Get complete error details if there is any.
IPLocator::getLanguages() Get the language details of IP Address location.
IPLocator::getCurrency() Get the IP Address home currency.
IPLocator::getTimeZone() Get the Time Zone of IP Address.
IPLocator::getThreat() Get malicious IP addresses details. also track Tor nodes and open proxies
IPLocator::getAsn() Get the ASN details about IP Address
IPLocator::getTodayRequestCount() Get the request count per day
IPLocator::getContinentDetails() Get the continent details of provided ip
IPLocator::getCountryDetails() Get the country details of provided ip
IPLocator::getRegionDetails() Get the region details of provided ip
IPLocator::getCity() Get the city of provided ip
IPLocator::getZip() Get the zip code of provided ip
IPLocator::isEu() Returns true or false depending on whether the country is a recognized member of the European Union
IpLocatorConfig::getLatLong() Get latitude and longitude of provided IP
IpLocatorConfig::getIsp() Get the Internet provider information
IpLocatorConfig::setSource() Set the api source.You can also set in .env file
IpLocatorConfig::setCredentials() Set the api credentials details.You can also set in .env file

Contributions and Bug Reports

We welcome contributions from the community to improve bytes4sale IPLocator. If you find a bug or have a suggestion for a new feature, we encourage you to participate and help make this package even better.

Bug Reports

If you encounter any issues or bugs while using bytes4sale IPLocator, please open an issue in our GitHub repository. When reporting a bug, please provide as much detail as possible, including:

Feature Requests

If you have a new feature idea or enhancement in mind, you can also open an issue in the GitHub repository. Please outline the feature's functionality and the problem it solves or the value it adds to the package.

Contributing

We appreciate contributions from the community to help us improve the package. If you'd like to contribute code, please follow these steps:

  1. Fork the repository and create a new branch from the master branch.
  2. Implement your changes or additions.
  3. Write tests to ensure the new code functions correctly and update existing tests as needed.
  4. Make sure all tests pass.
  5. Create a pull request (PR) to submit your changes. Clearly describe the changes you've made and any related issues or features.

Our team will review your PR, and if everything looks good, we'll merge it into the master branch.

By contributing to bytes4sale IPLocator, you agree to make your contributions available under this package.

We appreciate the efforts of our contributors, and your help will make the package better for everyone. Thank you!

License

The MIT License (MIT). Please see License File for more information.

Acknowledgments

If you find this package helpful, consider giving credit to the authors and contributors.


All versions of iplocator with dependencies

PHP Build Version
Package Version
Requires php Version ^7.3|^8.0
laravel/framework Version ^8.75
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package bytes4sale/iplocator contains the following files

Loading the files please wait ....