Hi
Not too sure what i've done wrong. When I use the sample plugin, I cant find a file created. And when I run the following, I see this in the sm log:
L 07/14/2008 - 05:07:59: [m_downloadtest.smx] $$$$
EDIT: Worked it out, need to read the string in the DownloadComplete callback, as it's threadded.
Code:
public DownloadComplete(const sucess, const status, Handle:arg)
{
PrintToServer("DownloadComplete: %i %i",sucess, status);
CloseHandle(down);
}
public Progress(const recvSize, const totalSize, Handle:arg)
...
public OnPluginStart()
{
down = CreateDownloader();
SetURL(down,"http://domain/file.php/");
SetCallback(down,DownloadComplete);
SetProgressCallback(down,Progress);
new String:response[1000];
SetOutputString(down,response,sizeof(response));
Download(down);
LogMessage("$$$$%s", response);
}