Jump to content




[HTTP] Website send download request.


  • You cannot reply to this topic
1 reply to this topic

#1 DarkenedEvil

  • Members
  • 59 posts

Posted 30 May 2013 - 09:11 PM

Hi I recently started a new project(CCC see my signature) and I need a way for the webpage(coded in PHP) to send a download request to the computer. Let me explain a bit more.

The computer sends a request to the webpage telling it the file name. I then want the webpage to check if the file exists and then if it does send a request back to the computer saying it is downloadable and what the link is so the computer can then download it. But heres the catch I only want that one web page and one computer program doing the work for security reasons I don't want any web URL's saved on the computer.

I have tried to wrap my head around a way to implement this for a few days but simply can't think of anything. Any and all help would be much appreciated.

Thanks in advanced!

#2 Yevano

  • Members
  • 376 posts
  • LocationUSA

Posted 30 May 2013 - 09:31 PM

You'd just want to have the page send the file in the http response. If there is no file, the response could be an error code. This sends the file directly instead of linking elsewhere. If you really need it to link elsewhere, then you'd send the link or an error code. When the computer sees the response, it makes a request to the link it gets.





2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users