Skip to content

Commit f442c69

Browse files
committed
Client: User-Agent
1 parent 9797c74 commit f442c69

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/DatingVIP/API/Client.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,14 @@ class Client
5555
*/
5656
protected $cookie = false;
5757

58+
/**
59+
* User-Agent string
60+
*
61+
* @var string $user_agent [= 'DatingVIP-API/1.0.10']
62+
* @access protected
63+
*/
64+
protected $user_agent = 'DatingVIP-API/1.0.10';
65+
5866
/**
5967
* Instance of DatingVIP\cURL\Request lib.
6068
*
@@ -183,6 +191,10 @@ private function curl()
183191
$this->curl->setCookieStorage($this->cookie);
184192
}
185193

194+
if ($this->user_agent) {
195+
$this->curl->setUseragent($this->user_agent);
196+
}
197+
186198
return $this->curl->setTimeout($this->timeout);
187199
}
188200

0 commit comments

Comments
 (0)