Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ip2location/ip2proxy-yii
IP2Proxy extension for Yii. It can be used to find the IP addresses which are used as VPN anonymizer, open proxies, web proxies and TOR exits nodes, search engine robots, data center ranges and residential proxies.
https://github.com/ip2location/ip2proxy-yii
ip2proxy proxy proxy-information web-service yii2 yii2-extension
Last synced: 7 days ago
JSON representation
IP2Proxy extension for Yii. It can be used to find the IP addresses which are used as VPN anonymizer, open proxies, web proxies and TOR exits nodes, search engine robots, data center ranges and residential proxies.
- Host: GitHub
- URL: https://github.com/ip2location/ip2proxy-yii
- Owner: ip2location
- License: mit
- Created: 2020-09-22T06:25:32.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2024-02-19T01:10:12.000Z (9 months ago)
- Last Synced: 2024-10-18T00:28:19.320Z (27 days ago)
- Topics: ip2proxy, proxy, proxy-information, web-service, yii2, yii2-extension
- Language: PHP
- Homepage: https://www.ip2location.com
- Size: 15.6 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.TXT
Awesome Lists containing this project
README
# IP2Proxy Yii extension
IP2Proxy Yii extension enables the user to query an IP address if it was being used as open proxy, web proxy, VPN anonymizer and TOR exit nodes, search engine robots, data center ranges, residential proxies, consumer privacy networks, and enterprise private networks. It lookup the proxy IP address from IP2Proxy BIN Data file or web service. Developers can use the API to query all IP2Proxy BIN databases or web service for applications written using Yii.## INSTALLATION
For Yii21. Run the command: `php composer.phar require ip2location/ip2proxy-yii` to download the plugin into the Yii2 framework.
2. Download latest IP2Proxy BIN database
- IP2Proxy free LITE database at https://lite.ip2location.com
- IP2Proxy commercial database at https://www.ip2location.com/proxy-database
3. Unzip and copy the BIN file into the Yii2 framework.**Note:** The BIN database refers to the binary file ended with .BIN extension, but not the CSV format.
Please select the right package for download.## USAGE
```
use IP2ProxyYii\IP2Proxy_Yii;// (required) Define IP2Proxy database path.
define('IP2PROXY_DATABASE', '/path/to/ip2proxy/database');// (required) Define IP2Location.io API key.
define('IP2LOCATION_IO_API_KEY', 'your_api_key');// (optional) Define Translation information. Refer to https://www.ip2location.io/ip2location-documentation for available languages.
define('IP2LOCATION_IO_LANGUAGE', 'en');$IP2Proxy = new IP2Proxy_Yii();
$record = $IP2Proxy->get('1.0.241.135');
echo 'Result from BIN Database:
';
echo 'IP Address: ' . $record['ipAddress'] . '
';
echo 'IP Number: ' . $record['ipNumber'] . '
';
echo 'IP Version: ' . $record['ipVersion'] . '
';
echo 'Country Code: ' . $record['countryCode'] . '
';
echo 'Country: ' . $record['countryName'] . '
';
echo 'State: ' . $record['regionName'] . '
';
echo 'City: ' . $record['cityName'] . '
';
echo 'Proxy Type: ' . $record['proxyType'] . '
';
echo 'Is Proxy: ' . $record['isProxy'] . '
';
echo 'ISP: ' . $record['isp'] . '
';
echo 'Domain: ' . $record['domain'] . '
';
echo 'Usage Type: ' . $record['usageType'] . '
';
echo 'ASN: ' . $record['asn'] . '
';
echo 'AS: ' . $record['as'] . '
';
echo 'Last Seen: ' . $record['lastSeen'] . '
';
echo 'Threat: ' . $record['threat'] . '
';
echo 'Provider: ' . $record['provider'] . '
';$record = $IP2Proxy->getWebService('1.0.241.135');
echo 'Result from Web service:
';
echo '';';
print_r ($record);
echo '
```## DEPENDENCIES
This library requires IP2Proxy BIN or IP2Proxy API key data file to function. You may download the BIN data file at
* IP2Proxy LITE BIN Data (Free): https://lite.ip2location.com
* IP2Proxy Commercial BIN Data (Comprehensive): https://www.ip2location.com/proxy-databaseYou can also sign up for [IP2Location.io IP Geolocation API](https://www.ip2location.io/sign-up) to get one free API key.
## SUPPORT
Email: [email protected]Website: https://www.ip2location.com