php-windows Digest 13 Dec 2006 23:22:12 -0000 Issue 3090
Topics (messages 27321 through 27321):
Re: ftp_connect() failed
27321 by: Mike Matz
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[email protected]
----------------------------------------------------------------------
--- Begin Message ---
Could it be the FTP server throttling repeated connects from the same
IP? Have you tried on different FTP server software?
-----Original Message-----
From: Alek Silverstone [mailto:[EMAIL PROTECTED]
Sent: Friday, December 08, 2006 8:01 AM
To: [email protected]
Subject: [PHP-WIN] ftp_connect() failed
<?php
set_time_limit(0);
$i=1;
while (TRUE)
{
$date=date('H:i:s');
$ftp=ftp_connect('127.0.0.1',21,10);
if ($ftp) $login=ftp_login($ftp,'anonymous',$i);
if ($ftp && $login)
{
if (($i % 100) === 0) echo "[$date] $i - online.\n";
} else {
echo "[$date] $i - offline.\n";
break;
}
if ($ftp!==FALSE) ftp_close($ftp);
$i++;
}
?>
This script failed after 100-10000 loops.
Tested on various servers and OSes.
What's wrong?
--
PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit:
http://www.php.net/unsub.php
--- End Message ---