Skip to content

Commit fd8b0da

Browse files
committed
Add User-Agent header to CURL requests
1 parent d3c7f3b commit fd8b0da

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/CurlRequest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ protected static function init($url, $httpHeaders = array())
4747
//Return the transfer as a string
4848
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
4949

50+
curl_setopt($ch, CURLOPT_USERAGENT, 'PHPClassic/PHPShopify');
51+
5052
$headers = array();
5153
foreach ($httpHeaders as $key => $value) {
5254
$headers[] = "$key: $value";
@@ -160,4 +162,4 @@ protected static function processRequest($ch)
160162
return $output;
161163
}
162164

163-
}
165+
}

0 commit comments

Comments
 (0)