问答 / 1 / 2 / 创建于 4年前 / 更新于 4年前
http
www.google.com.hk/search?q=curl%E4...
//代理地址 $proxy = "http://127.0.0.1:10809"; //设置代理 curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_HTTP); curl_setopt($ch, CURLOPT_PROXY, $proxy);
或者
\Ixudra\Curl\Facades\Curl::to('https://www.google.com')->withProxy('127.0.0.1', 10809)->get();
127.0.0.1 会是homestead的吧? 问题的关键不是代理,而是homestead
127.0.0.1
@UpGod 我的环境在 VM 虚拟机 CentOS7 下,虚拟机里的ip和本地也不是一个网段,但是可以ping通的。我的问题是:你确定你的主机和宿主机不能通信吗?比如 相互 ping
ping
我要举报该,理由是:
www.google.com.hk/search?q=curl%E4...
或者