Batch Downloading in PHP

Hits: 5111  




  echo"Processing: ".$link."<br>";
  exec("wget -O ".dirname(__FILE__)."/download/source-".$d.".zip ".$link." 2>&1",$pp);



//$file_headers = @get_headers($file);
//'HTTP/1.1 404 Not Found'
function url_exists($url){

function http_url_exists($url){
    if($file_headers[0]=='HTTP/1.1 404 Not Found')


Published by

Sandeep Verma

I’m an Entrepreneur. I’m proud to work as Blogger, LAMP Programmer, Linux Admin, Web Consultant, Cloud Manager, Apps Developer, Searcher. Concentrate > Observe > Imagine > Launch

One thought on “Batch Downloading in PHP”

  1. I think you could explain the script… For example: Why did you have two functions? url_exists() and http_url_exists() ? How about the function exec()? What’s wget -O? 
    If I have to find out about all this then your script is not so usefull to me.

Leave a Reply

Your email address will not be published.