Download the PHP package davidepastore/ipinfo without Composer

On this page you can find all versions of the php package davidepastore/ipinfo. 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 ipinfo

ipinfo

Latest version Build Status Coverage Status Quality Score Total Downloads PSR2 Conformance

A wrapper around the ipinfo.io services.

Install

You can install the library using composer:

How to use

Settings

Token

You can set your token when you instantiate the object but it's not mandatory.

cURL options

The cURL options to use while trying to connect when you instantiate the object:

Read details about the given ip

You can read all the properties from the given ip.

Read details about your ip

You can read all the properties from your ip.

Get info from the host

After obtaining the Host instance you can read all the properties or each of them individually.

Read only a field

There are different constants that you could use to read specific field value from an Ipinfo instance using the getSpecificField() and getYourOwnIpSpecificField() methods:

Read only the Geo data (which is faster)

By using the getIpGeoDetails() method you will get less fields. This call tends to be faster than getFullIpDetails() so use this call in case you only need the following fields:

These fields will be empty:

Error Handling

You can handle all the types of IpInfo exceptions by catching the IpInfoExceptionException:

Invalid Token Exception

It could happen that the token you are using to make the API call is not valid. You can handle it by catching the InvalidTokenException:

Rate Limit Exceed Exception

It could happen that your API call exceeds the rate limit. You can handle it by catching the RateLimitExceedException:

Wrong Ip Exception

It could happen that your API call is trying to obtain info about a wrong ip. You can handle it by catching the WrongIpException:

Issues

If you have issues, just open one here.


All versions of ipinfo with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
ext-curl Version *
ext-json Version *
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 davidepastore/ipinfo contains the following files

Loading the files please wait ....