You are here

function _clamav_get_version_via_daemon in ClamAV 6

Same name and namespace in other branches
  1. 7 clamav.inc \_clamav_get_version_via_daemon()

Get version information from a clamav daemon.

Parameters

String $host:

Int $port:

Return value

String

1 call to _clamav_get_version_via_daemon()
clamav_get_version in ./clamav.inc
Get the version information for clamav.

File

./clamav.inc, line 233
API and helper functions for the ClamAV module.

Code

function _clamav_get_version_via_daemon($host, $port) {
  $handler = @fsockopen($host, $port);
  if (!$handler) {
    return NULL;
  }
  fwrite($handler, "VERSION\n");
  $content = fgets($handler);
  fclose($handler);
  return $content;
}