http://curl.haxx.se/libcurl/
This has support for FTP and HTTP.