Skip to content

Instantly share code, notes, and snippets.

View Feyisayo's full-sized avatar

Feyisayo Akinboboye Feyisayo

  • Nigeria
View GitHub Profile
@Feyisayo
Feyisayo / download
Created June 4, 2015 17:50
This script is useful in downloading files unto a webserver.
<?php
// Enter URL of file to download here.
$f = 'https://wordpress.org/latest.tar.gz';
$dest_file = fopen (basename($f), "w");
if (!$dest_file) {
echo "<p>Error: Unable to open for writing.\n";
exit;
}
$src_file = fopen ($f, "r");