Page 1 of 1

FTP

Posted: Wed Sep 03, 2008 7:54 pm
by theBond
i am using wampserver and installed ftp server filezilla.

This is the code i am using to connect,

Code: Select all

<?php
 
$ftpServer = "ftp://192.168.1.27";
$ftpUser = "user1";
$ftpPass = "user1";
 
set_time_limit(160);
 
$conn = @ftp_connect($ftpServer)
or die("Couldn't connect to FTP server");
 
$login = @ftp_login($conn, $ftpUser, $ftpPass)
or die("Login credentials were rejected");
 
$workingDir = ftp_pwd($conn);
echo "You are in the directory: $workingDir";
 
ftp_quit($conn);
 
?>
 
I am not able to connect. I am getting the message "Couldn't connect to FTP server";

Re: FTP

Posted: Thu Sep 04, 2008 12:32 am
by it2051229
is your FTP server running? i mean listening to ftp connections?