Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
PHP based download accelerator
PHP
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
images
js
CurlAxel.php
LICENCE
README
test.php

README

hey, i thought many people will like that.
I just wanted to help, so this PHP class may help some people who need it.
it's not a script, neither a software, it's a class used by developers to be integrated in their scripts.
How about cookies, proxies and other curl option??
well, everybody know curl_setopt_array(), you need to create an array, put all your configs there and pass it to the class using
setCurlOpts(). But keep in mind, these settings will be overwritten:
 + CURLOPT_RETURNTRANSFER
 + CURLOPT_FOLLOWLOCATION
 + CURLOPT_BINARYTRANSFER
 + CURLOPT_FRESH_CONNECT
 + CURLOPT_CONNECTTIMEOUT
 + CURLOPT_FILE
 + CURLOPT_RANGE

Included Functins
this is a list of function made in the class
 + activeLog() - true or false - to desactivate activate log - log file is created in tempdir
 + setUrl() - sets the url to download
 + setParts() - number of connection (parts) to be created
 + setCookies() - set the cookies string to be passed with the curl request
 + setTempDir() - must be absolute parth, if not found, it will be created
 + setProgressCallback() - enable progressbars
 + setDownloadDir() - must be absolute parth, if not found, it will be created
 + setCurlOpts() - this is the function allowing you to set your cookies, proxies and other option as an array of curl options.
 + getFileSize() - you may use it to get the file size of a url
 + isMT() - check if the given url supports multithreaded connection
 + download() - the most important function  lol
 + slow_download() - force CurlAxel to download file using 1 connection
 + fast_download() - force CurlAxel to download file using multiple connection

to use the progress bar, you need to integrate jquery and jqueey progressbar plugin into your page. Here is what to do:
---------------------------------------------------------
 <head>
		<script src="js/jquery.js"></script>
		<script src="js/jquery.progressbar.min.js"></script>
	</head>
---------------------------------------------------------
it will look like that => http://i.imgur.com/b0SS0.png
see test.php for more details
Something went wrong with that request. Please try again.