<?
// Proxy IP Collecter
// J Watkins 4 matty005
// Ignore me.....don't change me
function extract_ips_from($string){
preg_match_all("/[0-9]+\.[0-9]+\.[0-9]+\.[0-9]/i", $string, $matches);
return $matches[0];
}
// Proxy Pages
$proxypages = array (
'http://www.proxy4free.com/page1.html',
'http://www.proxy4free.com/page2.html',
'http://www.proxy4free.com/page3.html',
'http://www.proxy4free.com/page4.html',
'http://www.proxy4free.com/page5.html'
);
// Loop over html pages in array, and collect data
foreach ($proxypages as $value) {
$proxylist .= file_get_contents($value);
}
// Extract ips
$ips = extract_ips_from($proxylist);
// Remove duplicate entries
$ips = array_keys(array_flip($ips));
// And there you have it $ips is full of nasty proxy addresses
echo '<pre>';
print_r($ips);
?>