Giter VIP home page Giter VIP logo

ip2proxy-php-api's Introduction

IP2Proxy PHP API

This project has been merged into IP2Proxy-PHP-Module. We will no longer maintain and support this project. Please visit IP2Proxy-PHP-Module for latest updates or enhancements.

This module allows user to query an IP address if it was being used as VPN anonymizer, open proxies, web proxies, Tor exits, data center, web hosting (DCH) range, search engine robots (SES), residential proxies (RES), consumer privacy networks (CPN), and enterprise private networks (EPN). It lookup the proxy IP address using IP2Proxy API.

Getting Started

To begin, an API key is required for this module to function. Find further information at https://www.ip2location.com/ip2proxy-web-service

Installation

Add the following to your composer.json file:

{
  "require": {
	"ip2location/ip2proxy-php-api": "1.*"
  }
}

Usage

<?php

require 'class.IP2ProxyAPI.php';

// Second parameter supports PX1 to PX10
$api = new IP2ProxyAPI('YOUR_API_KEY', 'PX8');

if ($api->query('1.2.3.4')) {
	echo '<strong>Country Code</strong>: ' . $api->countryCode . '<br>';
	echo '<strong>Country Name</strong>: ' . $api->countryName . '<br>';
	echo '<strong>Region</strong>: ' . $api->regionName . '<br>';
	echo '<strong>City</strong>: ' . $api->cityName . '<br>';
	echo '<strong>ISP</strong>: ' . $api->isp . '<br>';
	echo '<strong>Domain</strong>: ' . $api->domain . '<br>';
	echo '<strong>Usage Type</strong>: ' . $api->usageType . '<br>';
	echo '<strong>ASN</strong>: ' . $api->asn . '<br>';
	echo '<strong>AS</strong>: ' . $api->as . '<br>';
	echo '<strong>Last Seen</strong>: ' . $api->lastSeen . '<br>';
	echo '<strong>Proxy Type</strong>: ' . $api->proxyType . '<br>';
	echo '<strong>Is Proxy</strong>: ' . $api->isProxy . '<br>';
    echo '<strong>Threat</strong>: ' . $api->threat . '<br>';
}

Response message

Name Description
response OK if success, otherwise failed.
countryCode 2 digits country code.
countryName Country name.
regionName Region or state name.
cityName City name.
isp The service provider name.
isProxy YES if the IP is a Proxy. NO if the IP is not a proxy. DCH if the IP belongs to Hosting Provider, Data Center or Content Delivery Network. Note: DCH is only available for PX2, PX3 and PX4 query
proxyType The type of proxy service.
domain Internet domain name associated with IP address range.
usageType Usage type classification of ISP or company. Refer Usage Type section.
asn Autonomous system number (ASN).
as Autonomous system (AS) name.
lastSeen Proxy last seen in days.
threat Security threat reported.
Usage Type
  • (COM) Commercial
  • (ORG) Organization
  • (GOV) Government
  • (MIL) Military
  • (EDU) University/College/School
  • (LIB) Library
  • (CDN) Content Delivery Network
  • (ISP) Fixed Line ISP
  • (MOB) Mobile ISP
  • (DCH) Data Center/Web Hosting/Transit
  • (SES) Search Engine Spider
  • (RSV) Reserved

ip2proxy-php-api's People

Contributors

hexasoft-my avatar ip2location avatar seikan avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.