<?php

function getProxies($url) {
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    $result = curl_exec($ch);
    curl_close($ch);
    return explode("\n", $result);
}

$httpsProxies = getProxies('https://api.proxyscrape.com/?request=displayproxies&proxytype=https&timeout=7000&country=ALL&anonymity=elite&ssl=no');
$httpProxies = getProxies('https://api.proxyscrape.com/?request=displayproxies&proxytype=http&timeout=7000&country=ALL&anonymity=elite&ssl=no');
$socks4Proxies = getProxies('https://www.proxy-list.download/api/v1/get?type=socks4');
$socks5Proxies = getProxies('https://www.proxy-list.download/api/v1/get?type=socks5');

file_put_contents('https.txt', implode("\n", $httpsProxies));
file_put_contents('http.txt', implode("\n", $httpProxies));
file_put_contents('socks4.txt', implode("\n", $socks4Proxies));
file_put_contents('socks5.txt', implode("\n", $socks5Proxies));

echo "All proxies successfully grabbed & saved\n";
?>

Bu kod aşağıdaki işlevleri yerine getirir: belirtilen URL'lerden proxy'leri indirir, bunları dizelere böler ve uygun dosyalara yazar.

Yorumlar (0)

Burada henüz yorum yok, ilk siz olabilirsiniz!

Bir yanıt yazın

E-posta adresiniz yayınlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir


Proxy Seçin ve Satın Alın

Veri Merkezi Proxyleri

Dönen Proxyler

UDP Proxyleri

Dünya Çapında 10.000'den Fazla Müşterinin Güvendiği

Vekil Müşteri
Vekil Müşteri
Vekil Müşteri flowch.ai
Vekil Müşteri
Vekil Müşteri
Vekil Müşteri