All URIs are relative to https://api.cloudmersive.com
Method | HTTP request | Description |
---|---|---|
userAgentParse | POST /validate/useragent/parse | Parse an HTTP User-Agent string, identify robots |
\Swagger\Client\Model\UserAgentValidateResponse userAgentParse($request)
Parse an HTTP User-Agent string, identify robots
Uses a parsing system and database to parse the User-Agent into its structured component parts, such as Browser, Browser Version, Browser Engine, Operating System, and importantly, Robot identification.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: Apikey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Apikey', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Apikey', 'Bearer');
$apiInstance = new Swagger\Client\Api\UserAgentApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$request = new \Swagger\Client\Model\UserAgentValidateRequest(); // \Swagger\Client\Model\UserAgentValidateRequest | Input parse request
try {
$result = $apiInstance->userAgentParse($request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling UserAgentApi->userAgentParse: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
request | \Swagger\Client\Model\UserAgentValidateRequest | Input parse request |
\Swagger\Client\Model\UserAgentValidateResponse
- Content-Type: application/json, text/json
- Accept: application/json, text/json, application/xml, text/xml
[Back to top] [Back to API list] [Back to Model list] [Back to README]