PlanetSquires Forums

Support Forums => General Board => Topic started by: Marc van Cauwenberghe on April 30, 2012, 11:21:15 AM

Title: FTP file upload and download
Post by: Marc van Cauwenberghe on April 30, 2012, 11:21:15 AM
Hi,

probably should ask this over at the PB board, but I will try it here first.
Does anyone have an example of connecting to a webserver, getting a file, changing it and putting it back?
Can it be done with powerbasic commands?

Any help is apreciated.

Marc
Title: Re: FTP file upload and download
Post by: Wilko Verweij on April 30, 2012, 11:38:56 AM
Hi Marc,
I 've never done this but if I had to do this I would start with the TCP statements.
Success,
Wilko
Title: Re: FTP file upload and download
Post by: Marc van Cauwenberghe on April 30, 2012, 12:30:38 PM
Thank you Wilko,

I want to try this with the TCP statement, but not a lot of info on it.

Marc
Title: Re: FTP file upload and download
Post by: Jean-pierre Leroy on April 30, 2012, 01:04:08 PM
Marc,

I have a complete set of functions based on WinInet.dll if that could be of interest with FtpUpload() and FtpDownload() functions.

Regards,
Jean-Pierre
Title: Re: FTP file upload and download
Post by: Jim Dunn on April 30, 2012, 01:30:41 PM
I noticed that Jose Roca has an include file called "msieftp.inc"...

' ########################################################################################
' Library name: MSIEFTPLib
' Version: 1.0
' Documentation string: MSIEFTP 1.0 Type Library
' Path: C:\WINDOWS\system32\msieftp.dll
' Library GUID: {6E8CEDE1-746A-11D1-91F7-006097DF5BD4}
' ########################################################################################
Title: Re: FTP file upload and download
Post by: Jim Dunn on April 30, 2012, 01:35:49 PM
Oh, and don't forget Don Dickerson's PBFTP.ZIP over at http://www.greatwebdivide.com/code_tcpip.htm

(all FTP functions, using TCP)

: )
Title: Re: FTP file upload and download
Post by: Marc van Cauwenberghe on April 30, 2012, 01:51:55 PM
Thank you Jean-Pierre,
That would interest me a lot. I have heard of WinInet.dll, is it a dll that you just put in the your application folder without any registration and such?

Thanks Jim, I will have a look.

So nobody uses the build in TCP commands, why?

Best Regards,
Marc
Title: Re: FTP file upload and download
Post by: Marc van Cauwenberghe on April 30, 2012, 01:54:40 PM
OK Jim,

You posted while I was typing (and being called away by my wife :) ).
So Don posted some TCP functions way back, still wonder why (and I looked at posts on the powerbasic forums) don't generally use TCP commands.

Thanks again,
Marc
Title: Re: FTP file upload and download
Post by: Jim Dunn on April 30, 2012, 02:38:56 PM
Well, I can't speak for everyone else... but I like using the Windows API (instead of TCP commands) since it usually requires less coding for me, and many times the error handling is easier to debug.

And, not so much with FTP, but with HTTP/HTTPS, I use the Windows API which will automatically handle any proxy configuration the user might have.