Link to home
Start Free TrialLog in
Avatar of eggster34
eggster34

asked on

php script to download a file from the internet and zip it.

Hello

I need to write a php script that would

- accept a URL (i.e. www.mahmutabi.com/1.mp3)

- download this file to a set location on the server it's running on

- turn the original file into a zip file that would reside in the same folder

- delete the original file.

how would I do that? the script is running on linux.. so I somehow need to instruct the script to run some system commands such as

wget http://www.mahmutabi.com/1.mp3 but I don't know how to do that :(
Avatar of AmigoJack
AmigoJack

hmm... the most simple way would be to lookup www.php.net - so see this
http://www.php.net/manual/en/function.system.php
ASKER CERTIFIED SOLUTION
Avatar of star_trek
star_trek

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial