From fd8b0dad5f2afbdafc5a6f1d13ff55a53ae8b828 Mon Sep 17 00:00:00 2001 From: andyexeter Date: Mon, 19 Nov 2018 15:41:53 +0000 Subject: [PATCH] Add User-Agent header to CURL requests --- lib/CurlRequest.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/CurlRequest.php b/lib/CurlRequest.php index eb59477..f9cd242 100644 --- a/lib/CurlRequest.php +++ b/lib/CurlRequest.php @@ -47,6 +47,8 @@ protected static function init($url, $httpHeaders = array()) //Return the transfer as a string curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + curl_setopt($ch, CURLOPT_USERAGENT, 'PHPClassic/PHPShopify'); + $headers = array(); foreach ($httpHeaders as $key => $value) { $headers[] = "$key: $value"; @@ -160,4 +162,4 @@ protected static function processRequest($ch) return $output; } -} \ No newline at end of file +}