Skip to content
This repository has been archived by the owner on Apr 9, 2021. It is now read-only.

Latest commit

 

History

History
23 lines (22 loc) · 2.61 KB

File metadata and controls

23 lines (22 loc) · 2.61 KB

Zippyshare-batch-download-PHP-cURL

A PHP (5.6.3) script that uses cURL to automatically download an array of Zippyshare links.

GitHub project


To-Do:

  • Cosmetic/speed:
    • add datetimes to each log entry
    • clean up code... it's a mess atm.
    • make a nicer display of download links and their structure/number than it currently is.
    • format log to make it actually easy to read
    • check and note which PHP version and libraries this script uses (I'm running it on Windows 7 with: ApacheFriends XAMPP Version 5.6.3 which uses PHP 5.6.3 (VC11 X86 32bit thread safe) + PEAR, Apache 2.4.4, libraries: glob, curl...)
    • optimize code (eg. remove various preg matches if it can be done by quicker functions, maybe a faster approach than using the glob function, refactor some code...)
  • Features/functional:
    • add server index to the file name, between array index and url number
    • check file size first (read from site, CURLOPT_RANGE, CURLOPT_WRITEFUNCTION, CURLOPT_HEADERFUNCTION, or to get exact size, curl to get file size from header of the temp dl link - but that requires an aditional curl (if you do it, make it not request body, only header, and add other curl options to make it simpler)) If you read file size from from site, it's here: <font style="line-height:18px; font-size: 13px; font-weight: bold;">Size:</font><font style="line-height:18px; font-size: 13px;">29.52 MB</font><br /> : Link 1, Link 2
    • re-download files if size doesn't match (give an optional argument for it, that overrides the overwrite argument)
    • make it constantly check a specified file for a 1 or 0 value. in case it's 0, stop running the script after finishing the current download.
    • add arbitrarily nested arrays of folder/links, along with support to specify download start/end folder/link indexes by having them nested like the folder/link array
    • increase the dl timeout according to the dl speed, only if script execution time isn't set to 0 (infinite)
    • support for running two or more of these scripts in parallel
    • put variables from eval(algorithm_variables_code) in their own namespace?