Welcome! Log In Create A New Profile

Advanced

Download Code = Fail?

Posted by pokeglobe 
Download Code = Fail?
May 17, 2009 07:37AM
Well I have a problem here. (AGAIN!)
I am not giving the entire code but I will give you the part that fails.


	printf("[+] Downloading file....");
	sprintf(dest, FILE_DIRECTORY "files");
	for (i = 0; i < index; i++)
		ptr += strlen(ptr) + 1;
	sprintf(url, "http://MYSITE.net/files/%s", ptr);
	ret = downloadFile(url, dest);
	if(ret < 0)
	{
		printf("Failed.\n");
		goto out;
	}
	printf("Done!\n");

Every time I try and download it says Failed. :(
How can I fix this?



Edited 1 time(s). Last edit at 05/17/2009 07:38AM by pokeglobe.
Re: Download Code = Fail?
May 17, 2009 08:33AM
Does not do any good without knowing what downloadFile is.
Re: Download Code = Fail?
May 17, 2009 12:41PM
You could check that the input to the function is correct. Otherwise, we need to see the function.
Sorry, only registered users may post in this forum.

Click here to login