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.

AppGameKit Studio Chat / Find all files on a http server

Author
Message
Starbuzzzz
14
Years of Service
User Offline
Joined: 5th Dec 2010
Location: France
Posted: 1st Aug 2024 15:01
Hi,
I'm new with AppGameKit and I was a DB PRO BASIC user. I've got a question and I hope someone can help me : I wonder if there is a way to find the names of all the files I've go in a HTTP server. I know how to do that with BD PRO but I don't understand how I can do that with AppGameKit and if it's possible.
Thanx for your answers.
Buzzz
Starbuzzzz
TheWanted
1
Years of Service
User Offline
Joined: 17th Oct 2023
Location:
Posted: 1st Aug 2024 19:15 Edited at: 3rd Aug 2024 06:49
I use win32 API, if you want to go that route. I'll dig some code out
Starbuzzzz
14
Years of Service
User Offline
Joined: 5th Dec 2010
Location: France
Posted: 3rd Aug 2024 11:59
Hi.
Thanks for your answer. Do you mean that you must use win 32 api to retrieve the names of all the files on the server ? I want to know what files are on the server so my program can upload some of them. I'm ready to use win32 api if it's necessary but I don't know how to do that.
Starbuzzzz
Furord
10
Years of Service
User Offline
Joined: 8th Aug 2014
Location:
Posted: 3rd Aug 2024 12:32
I don't think there is a way to do that in AppGameKit, I have a server for downloading application files and the way to download them is to know in advance what is on the server, I use a file that contains the name of all the files that are on the server, that file is always called the same and is the one that the application looks for when connecting to the server. I hope I have been helpful or if someone does it in another way please tell us and it will be useful to all of us. Greetings
Starbuzzzz
14
Years of Service
User Offline
Joined: 5th Dec 2010
Location: France
Posted: 3rd Aug 2024 14:03
Oh ok. That's not very cool because files on the server can be created by other users and the only way to get some files would be to try to open each possible files and to download them if they exist on the server... It's possible to do that but it's not very practical... :/
Starbuzzzz
Kevin Picone
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Australia
Posted: 4th Aug 2024 03:22

Sounds like your talking about the FTP command set from DBpro as there's really no way to just pull a list of files/folder from a website.

If the site is yours then you write some script functions (in PHP say) that would pull a list of files/folder available from the server. Once uploaded to the site it'd return a list of the files/folders back to anyone who requests it.

If you're trying to download all the files from a random webpage; then yes you ca write a scraper but there's many off the self solutions already out there..

PlayBASIC To HTML5/WEB - Convert PlayBASIC To Machine Code
Phaelax
DBPro Master
22
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 4th Aug 2024 05:45
If you were using FTP commands in DBP, I created a library for AppGameKit a few months ago. Never fully finished a GUI for it yet.

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

Starbuzzzz
14
Years of Service
User Offline
Joined: 5th Dec 2010
Location: France
Posted: 4th Aug 2024 14:37
Hi Phaelax and thax,
I knew about your library but yours need an ip code to connect. Apparently it doesn't work with a ftp name :/
Starbuzzzz
Yeshu777
5
Years of Service
User Offline
Joined: 26th Feb 2020
Location: Cardiff ( Caerdydd ), Wales ( Cymru ), UK
Posted: 4th Aug 2024 16:03 Edited at: 4th Aug 2024 16:10
Hi Starbuzzz..

If you can connect to the ftp server using its name via a client app ( e.g. Filezilla ) - the name is resolved to an IP address for you in the logs...

Quote: "

Status: Resolving address of ftpstarbuzz.net
Status: Connecting to 123.45.678.11 : 21...
Status: Connection established, waiting for welcome message...
Status: Initializing TLS...
Status: TLS connection established.
Status: Logged in

"


Just a way to do it to test quickly.

It's a lot easier on Linux if you're not confined to Windows.
Starbuzzzz
14
Years of Service
User Offline
Joined: 5th Dec 2010
Location: France
Posted: 5th Aug 2024 10:15
Oh... I'm silly lol
So with your library I can find files on the ftp server, erase them, etc. Etc. ? Just like DB pro did with his FTP commands ? Cool so.
I'll try to use it.
Juste a little question : the library works for windows and Android apps ?
Thanx again.
Starbuzzzz
Phaelax
DBPro Master
22
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 5th Aug 2024 14:59
I haven't tried in android, just windows. But I don't see why it wouldn't work. As for the IP/name, I guess that's just how the socket commands work in AGK. I don't know why there isn't any name resolution.
Doesn't look like I ever implemented a delete command, but can probably add that in.

Do keep in mind, however, this is the very basic FTP protocol. Login info is sent in plain text.


Quote: "If you can connect to the ftp server using its name via a client app ( e.g. Filezilla ) - the name is resolved to an IP address for you in the logs..."

You can just do a ping from the cmd prompt, it'll give the IP.
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

Virtual Nomad
Moderator
19
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 5th Aug 2024 17:21
does DNS lookup help? i'm out of my league here but THIS might apply?

Login to post a reply

Server time is: 2025-05-12 02:42:49
Your offset time is: 2025-05-12 02:42:49