Get curl php blacklist whoer.net Get curl php blacklist whoer.net curl curl

Get curl php blacklist whoer.net


Use htmldom (http://simplehtmldom.sourceforge.net/)you can optimize this code, but this will do the trick

<?phpinclude('simple_html_dom.php');$html = file_get_html("http://whoer.net/");$array_result=array();$array_result_data=array();foreach($html->find('dl.ping') as $element){    foreach($element->find('dt') as $inelement){       array_push($array_result,trim($inelement->innertext));    }    foreach($element->find('dd') as $inelement){       array_push($array_result_data,trim($inelement->innertext));    }}//view data saved$i=0;foreach ($array_result as $key => $value) {    echo $value.$array_result_data[$i].'<br />';    $i++;}?>


You could use an XPath instead of regex.. this will capture yes and no and anything else they'd write in there

<?php $html=file_get_contents('http://whoer.net');$domd=@DOMDocument::loadHTML($html);$xp=new DOMXpath($domd);$res=$xp->query('//*[@id="content"]/div[1]/div/div[2]/dl/dd[5]/span[2]');$res=$res->item(0);$res=$res->textContent;$res=trim($res);var_dump($res);