Jump to content




Downloading Remote Files using HTTP

api computer help

5 replies to this topic

#1 Astrophylite

  • Members
  • 121 posts
  • Locationgps.locate()

Posted 21 July 2015 - 09:37 AM

Hi,

I found a topic already about this but it wasn't clear how to use it.
I am trying to make a program that will download the files. I have got to the point where it is successfully connecting to the website and downloading and saving the file but it returns as a HTML document.
Now, I do not want to use pastebin because it is easier to download from my website / DropBox.

Thanks in advance,
ZiR

EDIT: Here is the code:
Spoiler

Edited by _zircon_, 21 July 2015 - 09:54 AM.


#2 MKlegoman357

  • Members
  • 1,170 posts
  • LocationKaunas, Lithuania

Posted 21 July 2015 - 10:03 AM

The problem is that you're giving it the link to a webpage, rather than a direct link to a certain file. You'll have to somehow find a way to get the direct link of the file. Here's something I found on Google that might help.

#3 Astrophylite

  • Members
  • 121 posts
  • Locationgps.locate()

Posted 21 July 2015 - 10:08 AM

Thank you for your help! Now.. my problem is with my website..
Whenever I try to download from my website, it just says "Failed." which means that it cannot connect to my website.
I am providing the correct URL aswell.

Any help will be appreciated,
ZiR

#4 MKlegoman357

  • Members
  • 1,170 posts
  • LocationKaunas, Lithuania

Posted 21 July 2015 - 10:20 AM

Have you tried to download the file through your browser? This link gives me a 404 error: http://zircon.cf/dow...C_Code/test.txt

#5 Astrophylite

  • Members
  • 121 posts
  • Locationgps.locate()

Posted 21 July 2015 - 10:42 AM

It doesn't give me a 404.. For me it just shows a blank page ;(

EDIT: No, I cannot download it through my browser...

Edited by _zircon_, 21 July 2015 - 10:42 AM.


#6 jerimo

  • Members
  • 74 posts

Posted 21 July 2015 - 03:59 PM

If your browser doesnt anage to download it I highly doubt CC ever will while that holds true





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users