Update webpagetool.php

This commit is contained in:
Namhyeon Go 2018-03-21 11:05:48 +09:00 committed by GitHub
parent 846652deb9
commit 79456367fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -93,3 +93,19 @@ if(!function_exists("get_web_dom")) {
return $html;
}
}
if(!function_exists("get_web_meta")) {
function get_web_meta($url, $method="get", $data=array(), $proxy="", $ua="", $ct_out=45, $t_out=45) {
$details = array();
$response = get_web_page($url, $method, $data, $proxy, $ua, $ct_out, $t_out);
// load PHP-Metaparser
if($response['size'] > 0) {
loadHelper("metaparser.lnk");
$parser = new MetaParser($response['content'], $url);
$details = $parser->getDetails();
}
return $details;
}
}