$scraper = new Scrapers\FreeProxyListScraper($httpClient);
foreach ($scraper->get() as $proxy) {
echo (string)$proxy . "\n";
}
This will output ip:port.
I think currently there is no way to get the proxy protocol (HTTP, HTTPS, SOCKS) too.
If this is implemented, users can create filters like for example:
foreach ($scraper->get() as $proxy) {
// Only show proxies with the HTTPS protocol
if ($proxy->getProtocol() == "HTTPS") {
echo (string)$proxy . "\n";
}
}
If the protocol can't be scraped (this is mostly the case with online .txt lists) maybe you can just return ANY or null when using $proxy->getProtocol().
From the README file:
This will output
ip:port
. I think currently there is no way to get the proxy protocol (HTTP, HTTPS, SOCKS) too. If this is implemented, users can create filters like for example:If the protocol can't be scraped (this is mostly the case with online .txt lists) maybe you can just return
ANY
ornull
when using$proxy->getProtocol()
.