Download the PHP package proxycheck/proxycheck-php without Composer

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

proxycheck-php

php library for calling the proxycheck.io v2 API which allows you to check if an IP address is a Proxy or VPN and get the Country, ASN and Provider for the IP address being checked. This library also supports checking email addresses to determine if they belong to a disposable email service or not.

Install via Composer

You can install the library via Composer by running the following command:

To use the library, use Composer's autoload:

Dependencies

The library requires the following extensions in order to work properly:

Service Limits

Get your API Key at proxycheck.io it's free.

Getting Started

Performing a check on an address (IPv4 and IPv6 IP addresses are supported along with email addresses for disposable mailbox checking.).

In the above example we have included both countries and isocodes in both the and field. That is because as of 0.1.3 (May 2019) this library now supports both for use in these arrays. You can think of these two fields like a local whitelist/blacklist feature but only for countries.

Viewing the query result

When performing a query you will receive back an array which contains various information. Below is an example of parsing that array to determine if this user should be blocked or not. Please note the block and block_reason results are only populated when checking a single address, when passing an array of addresses to perform a multi-check these variables will both contain .

Extra information included in the query result

When performing a query you will receive not just and but also the entirety of the API response from proxycheck.io, we do this so you can either make an easy block system or utilise the data presented by the API as you see fit. A full result example is shown below.

In the above example the field lets you know the status of this query. You can view all our API responses here within our API documentation page. Also where in our example we show you will receive the actual address you sent to the API for checking.

Viewing Statistics from your Dashboard

In version 0.1.3 (May 2019) we added the ability to view statistics from your account dashboard through this library. Below is an example of how to do that.

When accessing dashboard API's an API Key is always required as the dashboard is only for registered users (both free and paid have full dashboard access). You will also need to make sure you have Dashboard API access enabled within your dashboard on our website.

You can see that in the field we are providing the name of the stat we would like to view. In this example we have selected but you can also check detections or queries. This library will also support future stat types automatically.

Below is an example of how this result would look.

When viewing the stat you can also provide a limit (which is how many entries to show you) and offset (which is how many entries to skip over before starting to show you any results).

So for example if you had 100 entries and you only wanted to view entries 31 to 40 you would supply 10 as a limit and 30 as an offset.

Manipulating your CORS Origins, Whitelist or Blacklist

In version 0.1.2 (Nov 2018) we added the ability to view, add, remove, set and clear your whitelist and blacklist through this library, in December 2020 a CORS API was added to proxycheck.io and the below code also works for that. Below is an example of adding three entries to your whitelist in a single query.

When accessing dashboard API's an API Key is always required as the dashboard is only for registered users (both free and paid have full dashboard access). You will also need to make sure you have Dashboard API access enabled within your dashboard on our website.

You can see that in the LIST_ENTRIES field we are providing an array of three seperate entries, this field is only used if you're performing an add, remove or set action. When providing entries in the LIST_ENTRIES field you can include comments, for example would create a new entry with the comment intact.

This LIST_ENTRIES field can also be used when adding, setting or removing origins for use with the CORS feature. In this situation comments are not supported, only domains (including wildcard domains such as *.example.com). All LIST_ACTION types are supported with CORS in the same way they are with Whitelist/Blacklist manipulation.

If a white or blacklist entry you're removing has a comment next to it you will need to include that comment in the removal request aswell, like in the example above where we included a comment next to the IP address we were adding you would do the same when removing it.


All versions of proxycheck-php with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4
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 proxycheck/proxycheck-php contains the following files

Loading the files please wait ....