Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Windows / Looking for FTP Functionality for AGK

Author
Message
Yeshu777
4
Years of Service
User Offline
Joined: 26th Feb 2020
Location: Cymru
Posted: 29th Feb 2024 05:19
Hi All,

Looking for SFTP / FTP functionality for a project, seen there were a few plugins available for DarkBasic.

Is there anything out there for standard AppGameKit?

Cheers!

Yeshu777
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 29th Feb 2024 22:54
Not that I know of, but it is possible to create your own. Depends how much work you want to put into it. Here's a "very" simply example that can get you started.
A good response will start with "200". On the initial connection you may get multiple lines of text returned, depends on your server. Once you get a line that says "200" or "200 some text here" then you can send your other ftp commands to the server, such as the login. The space after the 200 is important if text follows it as other lines may also start with 200 followed by text, but those lines will have a dash after the 200, not a space. If you want to try to build an ftp client, it might be simpler at first to try in passive mode before attempting active only because I think that can help reduce the chance of things not working due to network configurations. Otherwise, if you're uncertain about your code and have issues, it may be difficult to determine if its code related or a network problem. (research the two modes to understand why)

Should you actually build a viable library, remember to encode your credentials in some manner otherwise a savvy person could get your ftp login from your application.

This'll connect to the server and display the response but that is all. This example does not handle the login process or establishing the data connection.
Tiled TMX Importer V.2
XML Parser V.2
Base64 Encoder/Decoder
Purple Token - Free online hi-score database
Legend of Zelda
Pixel-Perfect Collision

"I like offending people, because I think people who get offended should be offended." - Linus Torvalds

Yeshu777
4
Years of Service
User Offline
Joined: 26th Feb 2020
Location: Cymru
Posted: 2nd Mar 2024 01:23
Hi Phalex,

Thanks for the reply, didn't realise you could use Sockets to connect to SFTP.

That in itself should give me enough to start with, however I think I'll create a Plugin for the final application.

Cheers!

Yeshu
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 6th Mar 2024 19:13
In case you haven't seen my other post, your inquiry inspired me to write a whole library just to see how doable it was.

https://forum.thegamecreators.com/thread/229535
Tiled TMX Importer V.2
XML Parser V.2
Base64 Encoder/Decoder
Purple Token - Free online hi-score database
Legend of Zelda
Pixel-Perfect Collision

"I like offending people, because I think people who get offended should be offended." - Linus Torvalds

Yeshu777
4
Years of Service
User Offline
Joined: 26th Feb 2020
Location: Cymru
Posted: 6th Mar 2024 23:30
Hi Phaelax,

Have commented on your post in Classic Chat - it's great work.

I have Rapsberry Pi's talking to the FTP server which are on site, and needed an app to interrogate the logs that have been uploaded.

Again, thank you for your help

Yeshu777

Login to post a reply

Server time is: 2024-05-05 23:03:12
Your offset time is: 2024-05-05 23:03:12