Yngvarr

Generation

generate functionSat, 15 Apr 2023

check proxy

function check_proxy($proxy) { $ch = curl_init(); curl_setopt($ch,CURLOPT_PROXY,$proxy); curl_setopt($ch,CURLOPT_URL,"http://www.google.com"); curl_setopt($ch,CURLOPT_RETURNTRANSFER,1); $result = curl_exec($ch); $http_code = curl_getinfo($ch,CURLINFO_HTTP_CODE); curl_close($ch); if ($http_code>=200 && $http_code<300) { return true; } else { return false; } }

Questions about programming?Chat with your personal AI assistant