Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $ip = file_get_contents("list.txt");
- $ip2 = explode("\r\n", $ip);
- foreach ($ip2 as $key => $value) {
- $data = explode(":", $value);
- $proxy = $data[0];
- $port = $data[1];
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, "http://ip-api.com/json/".$proxy."");
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
- $gege = curl_exec($ch);
- curl_close($ch);
- $gege1 = json_decode($gege, true);
- $negara = $gege1['country'];
- $isp = $gege1['isp'];
- $curl = curl_init();
- curl_setopt($curl, CURLOPT_URL, "https://proxy-checker.net/api/proxy-checker/");
- curl_setopt($curl, CURLOPT_POST, true);
- curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
- $headers = [
- "Accept: */*",
- "Accept-Language: en-US,en;q=0.9",
- "Connection: keep-alive",
- "Content-Type: application/x-www-form-urlencoded; charset=UTF-8",
- "Origin: https://proxyline.net",
- "Referer: https://proxyline.net/",
- "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36",
- ];
- curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
- $data1 = "proxy_list=" . $proxy . "%3A" . $port . "";
- curl_setopt($curl, CURLOPT_POSTFIELDS, $data1);
- $resp = curl_exec($curl);
- curl_close($curl);
- //var_dump($resp);
- $hasil = json_decode($resp, true);
- foreach ($hasil as $key => $value) {
- if ($value["valid"] == true) {
- if ($value["data"]["connection_time"] < 3) {
- $untukcheck = $value["ip"] . ":" . $value["port"] . " - ".$negara." - ".$isp." | Response Time : " . $value["data"]["connection_time"] . "\r\n";
- echo "CEPAT : " . $value["ip"] . ":" . $value["port"] . " | " . $value["protocol"] . " | Anonimity : " . $value["data"]["anonymity_level"] . " - ".$negara." - ".$isp." | Response Time : " . $value["data"]["connection_time"] . " second | LIVE! \r\n";
- $save = fopen("live-proxy.txt", "a+");
- fwrite($save, $untukcheck);
- fclose($save);
- } else {
- echo "LELET : " . $value["ip"] . ":" . $value["port"] . " | " . $value["protocol"] . " | " . $value["data"]["anonymity_level"] . " | " . $value["data"]["connection_time"] . " LIVE! \r\n";
- $save = fopen("lambat-proxy.txt", "a+");
- fwrite($save, $untukcheck);
- fclose($save);
- }
- } elseif ($value["valid"] == false) {
- echo "IP : " . $value["ip"] . ":" . $value["port"] . " DEAD! \r\n";
- }
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement