<&#63;php
/*Include the Nudity Filter file*/
include ('nf.php');
/*Create a new class called $filter*/
$filter = new ImageFilter;
/*Get the score of the image*/
$score = $filter -> GetScore($_FILES['img']['tmp_name']);
/*If the $score variable is set*/
if (isset($score)) {
/*If the image contains nudity, display image score and message. Score value if more than 60%, it is considered an adult image.*/
if ($score >= 60) {
echo "Image scored " . $score . "%, It seems that you have uploaded a nude picture.";
/*If the image doesn't contain nudity*/
} else if ($score <0) {
echo "Congratulations, you have uploaded an non-nude image.";
}
}
&#63;>