data = Dever::curl($url, $param['param'], $param['request_type'], $param['content_type'], $param['header']); } public function get($type) { return $this->filter($this->data, $type); } private function filter($string, $type) { if ($type != 'json') { $encode = mb_detect_encoding($string, array('GB2312','GBK','UTF-8')); $config = array('GB2312', 'GBK', 'EUC-CN', 'CP936'); if (in_array($encode, $config)) { $string = iconv('GBK', 'UTF-8', $string); } /* if ($encode == 'CP936') { $string = iconv('SJIS', 'UTF-8', $string); } */ $string = str_replace(PHP_EOL, '', $string); } return $string; } }