You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
353 B

  1. <?php
  2. require('vendor/autoload.php');
  3. $http = new p3k\HTTP();
  4. $http->set_user_agent('Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36 p3k-http/0.1.0');
  5. $headers = [
  6. 'Accept: text/html'
  7. ];
  8. $response = $http->get('http://aaronpk.com', $headers);
  9. print_r($response['headers']);