PHP Client - Validate API

Step 1 - Add the Client with the Composer Package Manager

Add the PHP client to your composer.json:

"require": {
    "cloudmersive/cloudmersive_validate_api_client": "^1.4",
}

Or you can install it manually by downloading it from our GitHub repo, and extracting to a ./vendor/cloudmersive/cloudmersive_validate_api_client folder.


Step 2 - Create an API Client object with API Key

Get your API Key (available in your Account Dashboard) and instantiate the API Client object:

<?php
require_once(__DIR__ . '/vendor/autoload.php');
require_once(__DIR__ . '/vendor/cloudmersive/cloudmersive_validate_api_client/vendor/autoload.php');

// Configure API key authorization: Apikey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Apikey', 'YOUR_API_KEY');



$apiInstance = new Swagger\Client\Api\EmailApi(
    
    
    new GuzzleHttp\Client(),
    $config
);
$email = "support@cloudmersive.com"; // string | Email address to validate, e.g. \"support@cloudmersive.com\".    The input is a string so be sure to enclose it in double-quotes.

try {
    $result = $apiInstance->emailFullValidation($email);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling EmailApi->emailFullValidation: ', $e->getMessage(), PHP_EOL;
}
?>




PHP Client - Image Recognition and Processing API

Step 1 - Add the Client with the Composer Package Manager

Add the PHP client to your composer.json:

"require": {
    "cloudmersive/cloudmersive_imagerecognition_api_client": "^1.4",
}

Or you can install it manually by downloading it from our GitHub repo, and extracting to a ./vendor/cloudmersive/cloudmersive_imagerecognition_api_client folder.


Step 2 - Create an API Client object with API Key

Get your API Key (available in your Account Dashboard) and instantiate the API Client object:

<?php
require_once(__DIR__ . '/vendor/autoload.php');
require_once(__DIR__ . '/vendor/cloudmersive/cloudmersive_imagerecognition_api_client/vendor/autoload.php');

// Configure API key authorization: Apikey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Apikey', 'YOUR_API_KEY');



$apiInstance = new Swagger\Client\Api\ArtisticApi(
    
    
    new GuzzleHttp\Client(),
    $config
);
$style = "style_example"; // string | The style of the painting to apply.  To start, try \"udnie\" a painting style.  Possible values are: \"udnie\", \"wave\", \"la_muse\", \"rain_princess\".
$image_file = "C:\\temp\\input.png"; // \SplFileObject | Image file to perform the operation on.  Common file formats such as PNG, JPEG are supported.

try {
    $result = $apiInstance->artisticPainting($style, $image_file);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ArtisticApi->artisticPainting: ', $e->getMessage(), PHP_EOL;
}
?>




PHP Client - Document and Data Convert API

Step 1 - Add the Client with the Composer Package Manager

Add the PHP client to your composer.json:

"require": {
    "cloudmersive/cloudmersive_document_convert_api_client": "^1.4",
}

Or you can install it manually by downloading it from our GitHub repo, and extracting to a ./vendor/cloudmersive/cloudmersive_document_convert_api_client folder.


Step 2 - Create an API Client object with API Key

Get your API Key (available in your Account Dashboard) and instantiate the API Client object:

<?php
require_once(__DIR__ . '/vendor/autoload.php');
require_once(__DIR__ . '/vendor/cloudmersive/cloudmersive_document_convert_api_client/vendor/autoload.php');

// Configure API key authorization: Apikey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Apikey', 'YOUR_API_KEY');



$apiInstance = new Swagger\Client\Api\ConvertDocumentApi(
    
    
    new GuzzleHttp\Client(),
    $config
);
$input_file = "C:\\temp\\input.docx"; // \SplFileObject | Input file to perform the operation on.

try {
    $result = $apiInstance->convertDocumentDocxToPdf($input_file);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ConvertDocumentApi->convertDocumentDocxToPdf: ', $e->getMessage(), PHP_EOL;
}
?>




PHP Client - Natural Language Processing API

Step 1 - Add the Client with the Composer Package Manager

Add the PHP client to your composer.json:

"require": {
    "cloudmersive/cloudmersive_nlp_api_client": "^1.3",
}

Or you can install it manually by downloading it from our GitHub repo, and extracting to a ./vendor/cloudmersive/cloudmersive_nlp_api_client folder.


Step 2 - Create an API Client object with API Key

Get your API Key (available in your Account Dashboard) and instantiate the API Client object:

<?php
require_once(__DIR__ . '/vendor/autoload.php');
require_once(__DIR__ . '/vendor/cloudmersive/cloudmersive_nlp_api_client/vendor/autoload.php');

// Configure API key authorization: Apikey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Apikey', 'YOUR_API_KEY');



$apiInstance = new Swagger\Client\Api\LanguageDetectionApi(
    
    
    new GuzzleHttp\Client(),
    $config
);
$text_to_detect = "The quick brown fox jumps over the lazy dog."; // string | Text to detect language of

try {
    $result = $apiInstance->languageDetectionPost($text_to_detect);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling LanguageDetectionApi->languageDetectionPost: ', $e->getMessage(), PHP_EOL;
}
?>




PHP Client - Optical Character Recognition (OCR) API

Step 1 - Add the Client with the Composer Package Manager

Add the PHP client to your composer.json:

"require": {
    "cloudmersive/cloudmersive_ocr_api_client": "^1.4"
}

Or you can install it manually by downloading it from our GitHub repo, and extracting to a ./vendor/cloudmersive/cloudmersive_ocr_api_client folder.


Step 2 - Create an API Client object with API Key

Get your API Key (available in your Account Dashboard) and instantiate the API Client object:

<?php
require_once(__DIR__ . '/vendor/autoload.php');
require_once(__DIR__ . '/vendor/cloudmersive/cloudmersive_ocr_api_client/vendor/autoload.php');

// Configure API key authorization: Apikey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Apikey', 'YOUR_API_KEY');



$apiInstance = new Swagger\Client\Api\ImageOcrApi(
    
    
    new GuzzleHttp\Client(),
    $config
);
$image_file = "C:\\temp\\page.png"; // \SplFileObject | Image file to perform OCR on.  Common file formats such as PNG, JPEG are supported.

try {
    $result = $apiInstance->imageOcrPost($image_file);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ImageOcrApi->imageOcrPost: ', $e->getMessage(), PHP_EOL;
}
?>




PHP Client - Barcode API

Step 1 - Add the Client with the Composer Package Manager

Add the PHP client to your composer.json:

"require": {
"cloudmersive/cloudmersive_barcode_api_client": "^1.4"
}

Or you can install it manually by downloading it from our GitHub repo, and extracting to a ./vendor/cloudmersive/cloudmersive_barcode_api_client folder.


Step 2 - Create an API Client object with API Key

Get your API Key (available in your Account Dashboard) and instantiate the API Client object:

<?php
require_once(__DIR__ . '/vendor/autoload.php');
require_once(__DIR__ . '/vendor/cloudmersive/cloudmersive_barcode_api_client/vendor/autoload.php');

// Configure API key authorization: Apikey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Apikey', 'YOUR_API_KEY');



$apiInstance = new Swagger\Client\Api\GenerateBarcodeApi(
    
    
    new GuzzleHttp\Client(),
    $config
);
$value = "value_example"; // string | QR code text to convert into the QR code barcode

try {
    $result = $apiInstance->generateBarcodeQRCode($value);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling GenerateBarcodeApi->generateBarcodeQRCode: ', $e->getMessage(), PHP_EOL;
}
?>




PHP Client - Virus Scan API

Step 1 - Add the Client with the Composer Package Manager

Add the PHP client to your composer.json:

"require": {
"cloudmersive/cloudmersive_virusscan_api_client": "^1.4"
}

Or you can install it manually by downloading it from our GitHub repo, and extracting to a ./vendor/cloudmersive/cloudmersive_virusscan_api_client folder.


Step 2 - Create an API Client object with API Key

Get your API Key (available in your Account Dashboard) and instantiate the API Client object:

<?php
require_once(__DIR__ . '/vendor/autoload.php');
require_once(__DIR__ . '/vendor/cloudmersive/cloudmersive_virusscan_api_client/vendor/autoload.php');

// Configure API key authorization: Apikey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Apikey', 'YOUR_API_KEY');



$apiInstance = new Swagger\Client\Api\ScanApi(
    
    
    new GuzzleHttp\Client(),
    $config
);
$input_file = "/path/to/file.txt"; // \SplFileObject | Input file to perform the operation on.

try {
    $result = $apiInstance->scanFile($input_file);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ScanApi->scanFile: ', $e->getMessage(), PHP_EOL;
}
?>




50,000 free API calls/month, no credit card required

Get started now!