Init Repo

This commit is contained in:
root
2019-09-06 23:53:10 +08:00
commit f0ef89dfbb
7905 changed files with 914138 additions and 0 deletions

17
vendor/swoole/tests/include/lib/curl.php vendored Executable file
View File

@ -0,0 +1,17 @@
<?php
function curlGet($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_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
//在http 请求头加入 gzip压缩
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Accept-Encoding: gzip'));
//curl返回的结果采用gzip解压
curl_setopt($ch, CURLOPT_ENCODING, "gzip");
$output = curl_exec($ch);
curl_close($ch);
return $output;
}