<?php
require_once('/homepages/0/d502303335/htdocs/js/simple_html_dom.php');
$html = file_get_html('http://www.hidemyass.com/proxy-list/search-226132');
echo $html;
echo "<br><br><br><br><br><br><br><br><br><br><br><br><br>";
echo "<pre>";
foreach ( $html->find ( 'tr' ) as $element ) {
$ip = $element->find ( 'td', 1 );
$port = $element->find ( 'td', 2 );
$ip = getIP ( $ip );
// var_dump($element->xmltext);
echo " $ip : $port \n";
}
function getIP($obj) {
global $html;
$style = explode ("<style>", $obj->xmltext );
$stile = style[1];
print_r ($stile);
$text = str_replace ( "div", "span", $obj->xmltext );
$text = explode ( "span", $text );
echo "<br><br><br><br>";
//print_r($text);
echo "<br><br><br><br>";
$ip = array ();
foreach ( $text as $value ) {
$value = trim ( $value );
$value = trim ( $value, "<" );
$value = trim ( $value, ">" );
$value = trim ( $value, "." );
if (empty ( $value ))
continue;
if (strpos ( $value, "display:none" )) {
continue;
}
if (strpos ( $value, "display:none" )) {
continue;
}
if (strpos ( $value, ">" )) {
$value = "<" . $value . ">";
}
$value = strip_tags ( $value );
$value = trim ( $value, "." );
if (empty ( $value ))
continue;
$ip [] = $value;
}
if (is_array ( $ip )) {
return implode ( ".", $ip );
}
}
?>
preferences:
51.14 ms | 402 KiB | 5 Q