PHP代理实现用老人机看小说
2020-02-27 21:03:00 来源: 评论:0 点击:
$fix = $fix["dirname"]."/";
}else{
$fix = _remoteurl_;
}
if (strpos($n,"#") !== false) {
$n = substr($n, 0, strpos($n,"#"));
}
if (substr($n, 0, 7) == "http://" || substr($n, 0, 8) == "https://") {
return $n;
}elseif (substr($n, 0, 2) == "//") {
return "http:".$n;
}else{
if (empty($n)) {
return false;
}
if (substr($n, 0, 1) == "/") {
return _remoteurl_.substr($n, 1);
}else{
return $fix.$n;
}
}
}
function _iconv($data, $output = utf-8) {
$encode_arr = array(UTF-8,ASCII,GBK,GB2312,BIG5,JIS,eucjp-win,sjis-win,EUC-JP);
$encoded = mb_detect_encoding($data, $encode_arr);
if (!is_array($data)) {
return mb_convert_encoding($data, $output, $encoded);
} else {
foreach ($data as $key=>$val) {
$key = _iconv($key, $output);
if(is_array($val)) {
$data[$key] = _iconv($val, $output);
} else {
$data[$key] = mb_convert_encoding($data, $output, $encoded);
}
}
return $data;
}
}
相关热词搜索:
上一篇:近 50 种花式 “Hello, World”
下一篇:玩转容器技术
评论排行
- ·手机“双卡双待”,卡一...(3)