i got some problem and need help ..
my plan :
1. get ip from free proxy ( hi d e my ass )
2. convert to XML
$html = file_get_contents('http://www.hidemyass.com/proxy-list/');
//$body = explode('<tbody>', $html);
$body = $html;
$xml = simplexml_load_string("<?xml version='1.0' encoding='utf-8'?><xml />");
$rows = array();
foreach (array_slice(explode('<td>', end($body)), 1) as $row)
{
preg_match('/span>([0-9])<\/span>/', $row, $ids);
preg_match('/span>([0-9])<\/span>/', $row, $dir);
preg_match('/span>([0-9])<\/span>/', $row, $due);
$node = $xml->addChild('train');
$node->addChild('route', $ids[1]);
$node->addChild('direction', $dir[1]);
$node->addChild('due', $due[1]);
}
header('Content-Type: text/xml');
echo $xml->asXML();
but still can not..
can you help me ?
thanks
jk
The simplest and ideal solution would have been
simple_html_domplease see : http://simplehtmldom.sourceforge.net/Example
But this would not give you the IP address in the format you want because HideMyASS is protecting such kind of extraction
A
tdcontaining IP address would look like thisCan you see
<div style="display: none">and sometimes<span style="display: none">some tiles they use integer clases such asclass=51which also means none ….I was able to get a crazy work aroud .. using
getIPfunction …. i hope this helpsOutput Example
Thanks