fix incomplete url for getting DOM

This commit is contained in:
2014-10-27 23:45:08 +01:00
parent ccfe202bd6
commit e55f2b6153

1
inc/databap.php Normal file → Executable file
View File

@@ -691,6 +691,7 @@ class Databap extends PhpObject
private function getRemotePageDom($sUrl) private function getRemotePageDom($sUrl)
{ {
$oDom = new DOMDocument(); $oDom = new DOMDocument();
if(mb_substr($sUrl, 0, 4)!='http') $sUrl = 'http://'.$sUrl;
@$oDom->loadHTML(file_get_contents($sUrl)); @$oDom->loadHTML(file_get_contents($sUrl));
return $oDom->getElementsByTagName('body')->item(0); return $oDom->getElementsByTagName('body')->item(0);
} }