How to use APIs

1. Ping and Pong!

This "Ping and Pong!" tool allows you to ping the URL and get the result "pong!" back. You can use this tool to verify your internet connectivity within your scripts or even when surfing internet using modern web browsers.

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
Here is an example code for scripting in PHP:

<?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 Get my IP Address tool allow you to get the accurate IP address of the client you are requesting from. Just ping our API URL and get the result in simple text form like "IP:1.2.3.4" This tool is a great resource if you use a lot of IPs in your interface.

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
Here is an example code for scripting in PHP:

<?php
function requestUrl($url$proxy null) {
  
$curl curl_init();
  
curl_setopt($curlCURLOPT_URL$url);
  if (
$proxy != NULL) {
    
curl_setopt($curlCURLOPT_PROXY$proxy);
  }
  
curl_setopt($curlCURLOPT_RETURNTRANSFERtrue);
  
curl_setopt($curlCURLOPT_SSL_VERIFYPEERfalse);
  
curl_setopt($curlCURLOPT_SSL_VERIFYHOSTfalse);
  
$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

This service allows you to detect a proxy. The API requires you to pass "IP" as a parameter in HTTP_GET request. On a valid IP address request, if given IP is proxy the API URL returns "TRUE" else it returns "FALSE", or if HTTP request is illegal, the system will return a message "Invalid IP address".

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
Here is an example code for scripting in PHP:

<?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.