Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting files from FTP sites

Status
Not open for further replies.

WelshTeckie

IS-IT--Management
Aug 9, 2007
37
GB
Hi,

I need to set up a php page that connects to a ftp site and get information from a txt file and displays it.

At the moment I'm struggling with getting connected! (not a good start!)

Can anyone help, I am still a basic coder when it comes to php, so here is my code

$conn = ftp_connect("ftp://111.11.111.11/") or die("Could not connect");
ftp_login($conn,"user","pass");
ftp_close($conn);

I'm really at the testing phase and taking it step by step!

Any ideas, Thanks.
 
From the manual:

host -- The FTP server address. This parameter shouldn't have any trailing slashes and shouldn't be prefixed with ftp://.
[\quote]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top