Update webpagetool.php

This commit is contained in:
Namhyeon Go 2018-10-21 04:03:08 +09:00 committed by GitHub
parent ea89b3a759
commit 43e73bd0d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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