Page 1 of 1

Help me to make a script

Posted: Sat Jun 01, 2002 8:55 pm
by Jose Arce
I'm trying to make a script that will check on several ips to see if they have an FTP server...well, the script goes like this:

Code: Select all

<?
/* Jose Arce Ping 0.1 */
$i = 0 ;
$servidores = $ip.$i ;
while (++$i <= 255) &#123;
$conexion = ftp_connect($servidores);
$conectar = ftp_login($conexion, 'anonymous', 'on@thenet.com') ;
if ((!$conexion) || (!$conectar)) &#123;
		echo "$servidores -----> imposible conectarse anonimamente" ;
		die;
	&#125;else&#123;
		echo "$servidores -----> <font color=red>si conecta anonimamente" ;
		ftp_close($conexion); 
	&#125;
&#125;
?>
The problem is that it doesn't work, the reason is in my other post...the numbers of the ips won't join...i hope you can help me :D

Posted: Sat Jun 01, 2002 9:12 pm
by volka
uh-ha
I supported a port-scanner 8O