data = Dever::curl($url); } public function get() { return $this->filter($this->data); } private function filter($string) { $encode = mb_detect_encoding($string, array('GB2312','GBK','UTF-8')); if ($encode == 'GB2312' || $encode == 'GBK' || $encode == 'EUC-CN') { $string = \iconv('GBK', 'UTF-8', $string); } if ($encode == 'CP936') { $string = \iconv('SJIS', 'UTF-8', $string); } $string = str_replace(PHP_EOL, '', $string); return $string; } }