I don't know if PHP is the right language for this type of coding but it's a lot easier then other languages. I found a little code that finds divisors in php but it sometimes gives the wrong answer.
<?php
$input = 8;
$total_divisors = 0;
for($i=1; $i < $input; $i++) {
if ($input % $i == 0) $total_divisors++;
}
print $total_divisors;
?>
As the output gives the answer 3 instead of 4. I believe this script doesn't count the number 1 as a divisor. I only know a little php and everything with $i gets a little complicated for me. If somebody can help me with a code that gives me correct divisor values (since I couldn't find any working ones except this one.) I might be able to make it myself.