更新时间:2023-02-26 10:15:50
您必须使用正则表达式匹配字符串(希望您使用PCRE ...).
You'll have to match the string using a regular expression (I hope you have PCRE...).
$el=$html->find('meta[http-equiv=Content-Type]',0)
$fullvalue = $el->content;
preg_match('/charset=(.+)/', $fullvalue, $matches);
echo $matches[1];
不是很健壮,但应该可以.
Not very robust, but should work.