note 29003 deleted from function.ftp-connect by didou

From: Date: Fri, 06 Jun 2003 13:34:26 +0000
Subject: note 29003 deleted from function.ftp-connect by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-49870@lists.php.net to get a copy of this message
Note Submitter: leggato@netel.bg ---- There is a simple script, which gets params from a form, so you can connect to which host you want, if you have a username and pass :)) , you will see IP address and hostname.The problem with buf error comes from wrong code...at least I think so, because I haven't had it. <?php $conn_id=ftp_connect("$host"); $ftp_username=$username; $ftp_pass=$password; $login_result=ftp_login($conn_id,$ftp_username,$ftp_pass); if((!$conn_id) || (!$login_result)) { echo "FTP connection has failed!"; echo "Attempted to connect to $ftp_server for user $ftp_user_name"; die(mysql_error()); } else { $host_name = gethostbyaddr($ip); $ip= gethostbyname($host_name); echo "<center>Connected to $host_name <br> IP address is: $ip <br><b> Wellcome user $ftp_username</b></center>"; //here you can include script, which shows directories } ?> Hello Bulgaria!!!!!!!!!!!

« previous php.notes (#49870) next »