Hi,
If you are on MS-Windows you might want to user the internet api, below is
an example of some part of my own program that ftp's files (this part
doesn't send files but if you lookup the api that is pretty easy to add).:
If you can decide how the files are compressed you could 'gzip' them and
unzip them with zlib library (works on ms-windows (by linking you program to
zlib.lib) as well as on most linux/unix systems (by including libz.a or
libz.so to your prorgram) (
http://www.zlib.net/). This library is very easy
to use.
Regards, Ron AF Greve
---------------------------------------------------------------------------------------
#include <shlwapi.h>
#include <shlobj.h>
#include <afxpriv.h>
if( InternetAttemptConnect( 0 ) == ERROR_SUCCESS )
{
if( !( Session = InternetOpen( Server, INTERNET_OPEN_TYPE_DIRECT, 0, 0,
0 ) ) )
{
AfxMessageBox( _T( "Could setup internet session" ) );
Succeeded = false;
}
else
{
if( !( Connection = InternetConnect( Session, Server,
INTERNET_DEFAULT_FTP_PORT, User,
Password, INTERNET_SERVICE_FTP, 0, 0 ) ) )
{
AfxMessageBox( _T( "Could not establish ftp session" ) );
Succeeded = false;
}
else
{
if( !FtpSetCurrentDirectory( Connection, RemoteDir ) )
{
AfxMessageBox( _T( "Could not set current dir" ) );
Succeeded = false;
}
else
{
if( !FtpCreateDirectory( Connection, _T( RemoteDir + "/" +
RelBackup ) ) )
{
//AfxMessageBox( _T( "Could not set current dir" ) );
//Succeeded = false;
}
}
}
}
}
--
Regards, Ron AF Greve
http://moonlit.xs4all.nl
"John" <ko*****@nextlevelsw.comwrote in message
news:11**********************@i42g2000cwa.googlegr oups.com...
We have created a game and when the user click on "Download New Songs"
which requires the user to download songs.
This could be over 20 songs.
I have these files zipped on the server in one *.zip file.
Is there any c++ code, or library that could help me do the following.
Download zip file to users computer.
Unzip the file and extract the files into songs subdirectory.
Delete the zip file.
Can this be done?