Forum Moderators: coopster

Message Too Old, No Replies

How to download and save into the server

         

sanezam

12:57 pm on Jun 6, 2007 (gmt 0)

10+ Year Member



I am designing a university website that is supposed to have faculty's resume in it but in order to make it easy for them to update their CV I want to ask them to have it as a txt file in their own webdirectory. The goal is to write a code in php so that it goes and downloads their accessible txt file, save it into the server and after several other steps shows it as html.

My major problem is how to download a file from the web and save it into the server by php so that I can open and read it. I would really appreciate any ideas that you professionals might have.

Habtom

1:07 pm on Jun 6, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to the Webmasterworld :)

If you want to copy it from a different webserver and save it in your server, you can just simply do this:

copy("http://www.example.com/index.html","files/index.html");

Habtom

[edited by: Habtom at 1:31 pm (utc) on June 6, 2007]