php 通过 curl 模拟发送 get 请求

php 通过 curl 模拟发送 get 请求

$ch=curl_init('http://www.scutephp.com/');

curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);

curl_setopt($ch,CURLOPT_BINARYTRANSFER,true);

$output=curl_exec($ch);

$fh=fopen("out.html",'w');

fwrite($fh,$output);

fclose($fh);

posted @ 2022-05-24 18:11  猎人博客园  阅读(173)  评论(0编辑  收藏  举报