<?php
$html = file_get_html("http://www.bfw.wiki/");
$el=$html->find('meta[http-equiv=Content-Type]',0);
$fullvalue = $el->content;
preg_match('/charset=(.+)/', $fullvalue, $matches);
echo $matches[1];
网友回复
<?php
$html = file_get_html("http://www.bfw.wiki/");
$el=$html->find('meta[http-equiv=Content-Type]',0);
$fullvalue = $el->content;
preg_match('/charset=(.+)/', $fullvalue, $matches);
echo $matches[1];
网友回复