PHP Simple port scanner

php
error_reporting
(0);
/*
Range : 1-1000
you can control it from this line


for($i=[1];$i<=[1000];$i++) {


How script worked ?
upload it to somewhere and type on URL bar this
http://site.com/portscanner.php?ip= [Someone's ip]
then click enter and you must wait to scann
then script show you whos port is opened.
*/

$ip
= $_GET['ip'];
if(isset($ip)) {
for($i=1;$i<=1000;$i++) {
    $conn
= @fsockopen($ip, $i);
   
if ($conn) {
        echo
"Port $i is open on $ip.
"
;
    fclose
($conn);
   
}
}
}
?>