simple.php 455 B

12345678910111213141516171819202122
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: Jaeger <JaegerCode@gmail.com>
  5. * Date: 18/12/11
  6. * Time: 下午6:48
  7. */
  8. require __DIR__.'/../vendor/autoload.php';
  9. use Jaeger\GHttp;
  10. $rt = GHttp::get('http://httpbin.org/get',[
  11. 'wd' => 'QueryList'
  12. ],[
  13. 'headers' => [
  14. 'referer' => 'https://baidu.com',
  15. 'User-Agent' => 'Mozilla/5.0 (Windows NTChrome/58.0.3029.110 Safari/537.36',
  16. 'Cookie' => 'cookie xxx'
  17. ],
  18. ]);
  19. print_r($rt);