Ok, so i wrote this really simple PHP function to figure out weather or not a port is open on a specific server.
function portcheck($first,$last,$ip){
ini_set('error_reporting', E_ALL);
for($i=$first;$i<=$last;$i++){
if (!@fsockopen($ip, (int)$i, $errno, $errstr, 10)){
echo "<span...