Scanning an Azure Blob for Viruses in PHP

Worried about the security of your cloud storage content? You’re not alone. Due to the complicated nature of maintaining privacy and data protection in the cloud vs. on premises, privacy and security are two of the biggest concerns when it comes to the cloud. Fortunately, the following API can assist with this concern by scanning a single Azure Blob file and its contents for viruses. This solution will leverage high-performance scanning capabilities to review a continuously updated collection of virus signatures, malware, ransomware, and other threats.

Image for post
Image for post

First, you will need to install the SDK:

composer require cloudmersive/cloudmersive_virusscan_api_client

Then, you’re ready to call the function with the following code:

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

Now you will be able to identify the virus name if one is present; if the file is clean, then no further action is needed. Head to the Cloudmersive website to gain access to your free API key, as well as 800 calls/month across our extensive selection of APIs.

Written by

There’s an API for that. Cloudmersive is a leader in Highly Scalable Cloud APIs.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store