View Full Version : automate ftp ?

david mccarthy
02-26-2008, 04:19 PM
Hi - I have developed a site that pulls data into MySQL and using some queries and echo's, presents a soft copy of a purchase order. At present, the user has to ftp the files(s) from a UNIX server to PC running Apache, then load the file (just enters the order number) into the MySQL database on PC.

It all works very well and looks good. To try and further streamline it, is there a way to do the ftp'ing with PHP - the file name will be entered by the user. I have looked at 'kermit' for unix, but not quite what I need...

Anu help much appreciated. (I guess there are a couple of hundred orders a week - typical order number would be 'PO51315'. At present I ftp two files. 51315D and 51315H, the D file loads into data_table and H file to header_table)

Hope I have not confused everyone!


02-26-2008, 06:21 PM
Yes php has ftp functions. They are in the manual (http://us2.php.net/ftp).

david mccarthy
02-26-2008, 10:09 PM
Who the hell do you think you are Aerospace?

If that is the general thought pattern in this forum then good luck! What kind of developer are you? What do you mean dont ask for help on it? -

Networking, sharing ideas and knowledge is what drives the development of software. Not sitting in you bedroom and not communicating with others.

I am not asking you to do anything for me - and may have phrased my post badly.

I know that ftp function is in the manual, as are most things.. I have now sorted it.

ps - I dont like you attitude son. Maybe you are in the wrong forum.

david mccarthy
02-26-2008, 10:20 PM
sorry about that Aero -

I just realised that that was your signature, and not directed at me personally...

sorry dude

02-26-2008, 11:47 PM
sorry for that aero , i think this is first time i saw someone speaking to u like that

but thats not his fault , when i started using forum i also thought the same.

But Aero is a very good coder . He helped many