中秋节快乐

This commit is contained in:
Alone
2024-09-14 17:00:49 +08:00
parent 610dee88cd
commit dff1b038b1
4286 changed files with 807503 additions and 6 deletions
+27
View File
@@ -0,0 +1,27 @@
<?php
/**
* Created by PhpStorm.
* User: Jaeger <JaegerCode@gmail.com>
* Date: 18/12/10
* Time: 下午4:04
*/
require __DIR__.'/../vendor/autoload.php';
use Jaeger\GHttp;
$urls = [
'http://httpbin.org/get?name=php',
'http://httpbin.org/get?name=go',
'http://httpbin.org/get?name=c#',
'http://httpbin.org/get?name=java'
];
GHttp::multiRequest($urls)->withHeaders([
'X-Powered-By' => 'Jaeger'
])->withOptions([
'timeout' => 10
])->concurrency(2)->success(function($response,$index){
print_r((String)$response->getBody());
print_r($index);
})->error(function($reason,$index){
print_r($reason);
})->get();