Browse Source

update user agent

master
Aaron Parecki 7 years ago
parent
commit
8090011ec9
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      lib/request.php

+ 1
- 1
lib/request.php View File

@ -59,7 +59,7 @@ function post($url, $params, $format='form') {
function set_user_agent(&$ch) {
// Unfortunately I've seen a bunch of websites return different content when the user agent is set to something like curl or other server-side libraries, so we have to pretend to be a browser to successfully get the real HTML
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) p3k/Monocle/0.1.0 AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.57 Safari/537.36');
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) p3k/Switchboard/0.1.0 AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.57 Safari/537.36');
}
function response_is($status, $prefix) {

Loading…
Cancel
Save