Sets a custom useragent string for the class.
Access
public
Parameters
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
|
Required |
The useragent string to use. |
Returns
Type |
Description |
|---|---|
|
A reference to the current instance. |
Examples
Set a useragent string to use for HTTP requests.
$http = new RequestCore('http://github.com/skyzyx/requestcore/raw/master/_tests/test_request.txt');
$http->set_useragent('SampleUserAgentString');
var_dump($http->useragent);
Result:
string(21) "SampleUserAgentString"
Source
Method defined in lib/requestcore/requestcore.class.php | Toggle source view (5 lines) | View on GitHub

