How to use APIs
1. Ping and Pong!
Because it is a cross platform API, you can use it in any language of your choice. Like Java, PHP, Ruby and Rails, Python and more. All you need to do is to send a request to the API URL and if the connection is successful, the message "pong!" will be returned.
- API URL: http://www.ip-check.net/ping/
- Parameters: No
- Expected Result: pong!
- Languages Support: All
- Cost: Free
<?php
$ping = file_get_contents("http://www.ip-check.net/ping/");
if ($ping == "pong!") {
echo "Alright!";
} else {
echo "Not able to connect!";
}
You can contact us for any further assistance.
2. Get my IP address
The best usage for this API would be, when you are having 1000+ proxies and would like to test each one of them in your script for accuracy. Use CURL to setup proxy and then confirm IP changes, simple!
- API URL: http://www.ip-check.net/myip/
- Parameters: No
- Expected Result: Server IP like "IP:103.255.5.39"
- Languages Support: All
- Cost: Free
<?php
function requestUrl($url, $proxy = null) {
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
if ($proxy != NULL) {
curl_setopt($curl, CURLOPT_PROXY, $proxy);
}
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
$contents = curl_exec($curl);
curl_close($curl);
return $contents;
}
$url = "http://www.ip-check.net/myip/";
$proxy = "1.2.3.4:8800"; // <-- set your proxy
$content = requestUrl($url, $proxy);
print $content;
You can contact us for further assistance.
3. Proxy Detect
NOTE: Don't use URL encoding on the parameter.
- API URL: http://www.ip-check.net/api/proxy-detect.php?ip=x.x.x.x
- Parameters: IP
- Expected Result: TRUE or FALSE
- Languages Support: All
- Cost: Free
<?php
$ip = "IP Address you want to check";
$proxyDetect = file_get_contents("http://www.ip-check.net/api/proxy-detect.php?ip=$ip");
if ($proxyDetect == "TRUE") {
echo "Proxy Detected";
} else if ($proxyDetect == "FALSE") {
echo "Proxy Not Detected";
} else {
echo "Invalid IP Address";
}
You can contact us for further assistance.