$IP = $_SERVER['REMOTE_ADDR']; $PORT = $_SERVER['REMOTE_PORT']; $test_page = 'http://google.com'; $cUrl = curl_init(); curl_setopt($cUrl, CURLOPT_URL, $test_page); curl_setopt($cUrl, CURLOPT_RETURNTRANSFER, 1); curl_setopt($cUrl, CURLOPT_TIMEOUT, '10'); curl_setopt($cUrl, CURLOPT_NOBODY, 1); curl_setopt($cUrl, CURLOPT_PROXY, $IP.':'.$PORT); $pageContent = trim(curl_exec($cUrl)); curl_close($cUrl); if (empty($pageContent)) echo '
this is not a proxy '.$IP.':'.$PORT.'
'; else echo '
this is a proxy '.$IP.':'.$PORT.'
';