BlitzMax and the Internet

BlitzMax Forums/BlitzMax Programming/BlitzMax and the Internet

Brucey(Posted 2007) [#1]
Here's another cross-platform module some of you may like to play with :

BaH.libcurl

libcurl is intended to make accessing the internet, transferring files and the like, a little easier.

It supports lots of protocols (like HTTP and FTP), as well as HTTP POST, HTTP PUT, FTP uploading, HTTP form based upload, proxies, cookies, user+password authentication, file transfer resume, http proxy tunneling and more!

It doesn't do *everything* for you though (for instance, it's not a complete FTP application!), so you will probably need to read up on certain internet protocols if you wish to do anything more advanced than basic file transfers.

This version of libcurl does NOT support SSL (HTTPS etc), but I'm working on a separate build for that at the moment. (bah.libcurlssl)


Oh, and I put together another FTP list parser module which will process FTP lists and present the information in a Type (like name, path, filesize, timestamp etc), which could be useful for uh, FTP things...

Anyhoo... hope someone finds it useful, and appreciates all the effort that went into making it work seamlessly in BlitzMax ;-)

PS. Remember to run "Document Modules" in your IDE to get the documentation integrated.


jamesmintram(Posted 2007) [#2]
Hey man, thats awsome :) - thanks again for another great module!

I will find this very usefull.


assari(Posted 2007) [#3]
Thanks Brucey. Will be checking this out
Your module work is always appreciated


Spot-Nothing(Posted 2007) [#4]
wonderful. i'm especially interested in the ssl support to connect our games to a secure hiscore server.


xlsior(Posted 2007) [#5]
Looks useful!

Speaking of internet stuff: any way to send/receive PING's from within BlitzMax?


Filax(Posted 2007) [#6]
Great module Brucey ! as always :) I'm fan of your web page :)
the next time that i use one of your products,i'll try to make
a donation to help you :) promise ! :)

Good job :)


Brucey(Posted 2007) [#7]
i'm especially interested in the ssl support


Got it connecting via HTTPS now, which is a step in the right direction :-)
Using OpenSSL dlls for that (required on Win32. Linux/OSX tend to have OpenSSL already).

There are a *lot* of options for SSL, like authentication methods etc. I'll probably just supply a couple of examples to get you on the right track. The rest will be up to you to find out how to utilize it fully.

any way to send/receive PING's

Ping uses port 7, which is in the "admin" range of 1-1024 - so you need admin rights to do anything with that port-range. Good luck ;-)

And I should probably link to a load of RFCs for when someone wants to ask things like, "how do you change permissions on a file over FTP?" :-p


Brucey(Posted 2007) [#8]
Hallo again :-)

After lots more tweaking and testing, I'm finally able to release the bah.libcurlSSL module - that is, libcurl with SSL support :-)

This is a separate module from the standard libcurl module, due to its 3rd-party OpenSSL requirements. Otherwise the two are completely interchangeable, API-wise.
SSL gives you access to HTTPS and FTPS protocols, as well a wider range of authentication methods (such as digest, NTLM etc).

I've also released an update to the libcurl module, adding support for asynchronous DNS/name resolving, via the c-ares library. (think faster initial server connections)

Both modules have been tested across all platforms, and perform the same on each. (which is what you'd hope would be the case :-)


Oh, and I've updated the bah.DBSQLite module to the latest SQLite 3.4.2.


Any problems or comments, you know where to find me :-)


agent4125(Posted 2007) [#9]
Wow, this is the first time I've seen your site. Great work!