2 Star 1 Fork 0

vForce/extract-39net-disease-sympton-department

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
util.php 778 Bytes
一键复制 编辑 原始数据 按行查看 历史
<?php
function getHTML($url, $GBKtoUTF8 = true) {
// if($GBKtoUTF8) return iconv("GBK", "UTF-8", file_get_contents("compress.zlib://" . $url));
// else return file_get_contents("compress.zlib://" . $url);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch,CURLOPT_ENCODING , "gzip");
$content = curl_exec($ch);
curl_close($ch);
if ($GBKtoUTF8) return iconv("GBK", "UTF-8", $content);
else {
return $content;
}
}
function dumpVariableToFile($variable, $file, $variableName) {
$fp = fopen($file, "w");
fwrite($fp, '<?php' . "\n" . '$' . $variableName . " = " . var_export($variable, true) . ";");
fclose($fp);
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/vforce/extract-39net-disease-sympton-department.git
git@gitee.com:vforce/extract-39net-disease-sympton-department.git
vforce
extract-39net-disease-sympton-department
extract-39net-disease-sympton-department
master

搜索帮助