test-port.php -- source code?
Posted: Fri May 23, 2008 9:02 pm
Can I see the source code to test-port.php? I'm interested in how it works.
Support Forum for the Deluge BitTorrent Client
https://forum.deluge-torrent.org/
Code: Select all
<?php
error_reporting(0);
$host = $_SERVER['REMOTE_ADDR'];
$i = $_GET['port'];
$fp = fsockopen("$host",$i,$errno,$errstr,10);
if($fp){
echo "TCP port " . $i . " open on " . $host . "<br><br>Yay! :-)";
fclose($fp);
}
else{
echo "TCP port " . $i . " closed on " . $host . "\n";
}
flush();
?>