3 Replies - 551 Views - Last Post: 10 August 2011 - 03:25 AM Rate Topic: -----

#1 mikelash  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 94
  • Joined: 17-June 11

download file from internet to my website

Posted 10 August 2011 - 12:11 AM

i have a page on my site with a frame with google.com in it. i want to be able to search around the internet in that frame and when you want to download a file it downloads to the site. is this possible? and if not is there anyway to download files with the file location of the internets file to a PHP file downloader on the site

This post has been edited by mikelash: 10 August 2011 - 12:37 AM

Is This A Good Question/Topic? 0
  • +

Replies To: download file from internet to my website

#2 paradoxia  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 163
  • Joined: 02-July 11

Re: download file from internet to my website

Posted 10 August 2011 - 12:21 AM

I am sorry because your question is not very clear for me but I answered it as I understood.


First of all are you clear with the difference between Uploading and Downloading?

Uploading---> is adding files to a server, where a website is located(hosted), from your computer(client computer)
Downloading--->is taking files from a server where a site is located(hosted) to your computer(client computer)

So there is no such thing like downloading a file to a site
Actually, you can download files from one server to your site's server and then you can have a link on your website to access that downloaded file. Do you want to do this?

This post has been edited by paradoxia: 10 August 2011 - 12:21 AM

Was This Post Helpful? 0
  • +
  • -

#3 aaron1178  Icon User is offline

  • Dovakiin, Dragonborn
  • member icon

Reputation: 169
  • View blog
  • Posts: 1,298
  • Joined: 22-October 08

Re: download file from internet to my website

Posted 10 August 2011 - 12:22 AM

It probably is possible but myself personally would not do it for security reasons. And you would need authentication from the site owner to allow his/her content on your site.

EDIT:

3 minutes in GOOGLE found these
http://php.net/manua...file-upload.php
http://www.php.net/m...n/intro.ftp.php

This post has been edited by aaron1178: 10 August 2011 - 12:26 AM

Was This Post Helpful? 0
  • +
  • -

#4 RudiVisser  Icon User is offline

  • .. does not guess solutions
  • member icon

Reputation: 1003
  • View blog
  • Posts: 3,562
  • Joined: 05-June 09

Re: download file from internet to my website

Posted 10 August 2011 - 03:25 AM

Do you mean instead of the user being presented with a save file dialog it saves straight to your computer?

In which case yes and it would be a pretty awesome thing to do really, but will require time and bandwidth on your part.

Basically every page that loads, you need to take ALL of the links and do a HEAD request to the server hosting them and get back the Content-Type header. If it's not text/html (or related, something that could be parsed by the browser) then you change the link out and link to a downloader script on your site instead, this will then perform the full GET request and save the file.

That sounds fun! I'm being serious anyway good luck, it's simple and cooool.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1