PHP script to unzip file

Hello friends here is the php script to unzip .zip files. <?php $zip = new ZipArchive; $res = $zip->open(''); if ($res === TRUE) { $zip->extractTo('./'); $zip->close(); echo 'woot!'; } else { echo 'doh!'; } ?>

Download file directly in server with php script

Hello guys with this php script you can Download file directly in server with php script. <html> <form method="post"> <input name="url" /> <input name="submit" type="submit" /> </form> <?php // maximum execution time in seconds set_time_limit (24 * 60 * 60); if (!isset($_POST['submit'])) die(); // folder to save downloaded files to.... [Read More]

Php program for insertion sort, Easy implementation

Php program for insertion sort. Easy implementation. here is the link just try once <?php /**Function for sorting an array with insertion sort algorithm. * * @param array $array * @return array */ function insertionSort(array $array) { $length=count($array); for ($i=1;$i<$length;$i++) { $element=$array[$i]; $j=$i; while($j>0 && $array[$j-1]>$element) { //move value... [Read More]
Tags: Algorithms PHP