well, the manual for clamav doesn't have any php examples, but i managed to hack together the following script to process the files. I'm not completely certain it is working because I have no virii to test with other than the infected files included with clamav and from what I can tell they are being deleted:
foreach($files as $key){
if($key['name'] !== ""){
$infected = virus_scan($key);
if($infected == false){
upload($key['tmp_name']);
}else{
unlink($key['tmp_name']);
}
}
}
function virus_scan($file){
$file = $file['tmp_name'];
$last_line = system('clamscan $file',$returned);
return $returned;
}
If anyoen should happed to have any suggestions, I'd be happy to hear them.