PHP Client - Validate API

Step 1 - Add the Client with the Composer Package Manager

Install the PHP client using Composer by executing this command from the command line:

composer require cloudmersive/cloudmersive_validate_api_client

Or add the PHP client to your composer.json:

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

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

Install the PHP client using Composer by executing this command from the command line:

composer require cloudmersive/cloudmersive_imagerecognition_api_client

Or add the PHP client to your composer.json:

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

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

Install the PHP client using Composer by executing this command from the command line:

composer require cloudmersive/cloudmersive_document_convert_api_client

Or add the PHP client to your composer.json:

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

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 - Data Integration API

Step 1 - Add the Client with the Composer Package Manager

Install the PHP client using Composer by executing this command from the command line:

composer require cloudmersive/cloudmersive_dataintegration_api_client

Or add the PHP client to your composer.json:

"require": {
"cloudmersive/cloudmersive_dataintegration_api_client": "^1.0",
}

Or you can install it manually by downloading it from our GitHub repo, and extracting to a ./vendor/cloudmersive/cloudmersive_dataintegration_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');

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



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

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




PHP Client - Currency API

Step 1 - Add the Client with the Composer Package Manager

Install the PHP client using Composer by executing this command from the command line:

composer require cloudmersive/cloudmersive_currency_api_client

Or add the PHP client to your composer.json:

"require": {
"cloudmersive/cloudmersive_currency_api_client": "^1.0",
}

Or you can install it manually by downloading it from our GitHub repo, and extracting to a ./vendor/cloudmersive/cloudmersive_currency_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');

// 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\CurrencyExchangeApi(
	// 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
);
$source = "source_example"; // string | Source currency three-digit code (ISO 4217), e.g. USD, EUR, etc.
$destination = "destination_example"; // string | Destination currency three-digit code (ISO 4217), e.g. USD, EUR, etc.
$source_price = 1.2; // double | Input price, such as 19.99 in source currency

try {
	$result = $apiInstance->currencyExchangeConvertCurrency($source, $destination, $source_price);
	print_r($result);
} catch (Exception $e) {
	echo 'Exception when calling CurrencyExchangeApi->currencyExchangeConvertCurrency: ', $e->getMessage(), PHP_EOL;
}
?>




PHP Client - Natural Language Processing API

Step 1 - Add the Client with the Composer Package Manager

Install the PHP client using Composer by executing this command from the command line:

composer require cloudmersive/cloudmersive_nlp_api_client

Or add the PHP client to your composer.json:

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

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

Install the PHP client using Composer by executing this command from the command line:

composer require cloudmersive/cloudmersive_ocr_api_client

Or add the PHP client to your composer.json:

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

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

Install the PHP client using Composer by executing this command from the command line:

composer require cloudmersive/cloudmersive_barcode_api_client

Or add the PHP client to your composer.json:

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

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 - Video and Media Services API

Step 1 - Add the Client with the Composer Package Manager

Install the PHP client using Composer by executing this command from the command line:

composer require cloudmersive/cloudmersive_virusscan_api_client

Or add the PHP client to your composer.json:

"require": {
	"cloudmersive/cloudmersive_video_api_client": "^1.0"
	}

Or you can install it manually by downloading it from our GitHub repo, and extracting to a ./vendor/cloudmersive/cloudmersive_video_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');

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



$apiInstance = new Swagger\Client\Api\VideoApi(
	
	
	new GuzzleHttp\Client(),
	$config
);
$input_file = "/path/to/inputfile"; // \SplFileObject | Input file to perform the operation on.
$file_url = "file_url_example"; // string | Optional; URL of a video file being used for conversion. Use this option for files larger than 2GB.
$max_width = 56; // int | Optional; Maximum width of the output video, up to the original video width. Defaults to original video width.
$max_height = 56; // int | Optional; Maximum height of the output video, up to the original video width. Defaults to original video height.
$preserve_aspect_ratio = true; // bool | Optional; If false, the original video's aspect ratio will not be preserved, allowing customization of the aspect ratio using maxWidth and maxHeight, potentially skewing the video. Default is true.
$frame_rate = 56; // int | Optional; Specify the frame rate of the output video. Defaults to original video frame rate.
$quality = 56; // int | Optional; Specify the quality of the output video, where 100 is lossless and 1 is the lowest possible quality with highest compression. Default is 50.
$extend_processing_time = true; // bool | Optional; If true, will allow additional processing time for the video file conversion, using one API call per additional minute over the 5 minute default processing time, up to a maximum of 25 total minutes. This is generally necessary for files larger than 500 MB or longer than 30 minutes.

try {
	$result = $apiInstance->videoConvertToMp4($input_file, $file_url, $max_width, $max_height, $preserve_aspect_ratio, $frame_rate, $quality, $extend_processing_time);
	print_r($result);
} catch (Exception $e) {
	echo 'Exception when calling VideoApi->videoConvertToMp4: ', $e->getMessage(), PHP_EOL;
}
	?>




PHP Client - Virus Scan API

Step 1 - Add the Client with the Composer Package Manager

Install the PHP client using Composer by executing this command from the command line:

composer require cloudmersive/cloudmersive_virusscan_api_client

Or 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;
}
?>


Video Walkthrough





800 free API calls/month, no credit card required

Get started now!