Code: Select all
<?php
$fp = fsockopen ("www.example.com", 80, $errno, $errstr, 30);
if (!$fp) {
echo "$errstr ($errno)<br>\n";
} else {
fputs ($fp, "GET / HTTP/1.0\r\nHost: www.example.com/tough.zip");
while (!feof($fp)) {
echo fgets ($fp,128);
}
fclose ($fp);
}
?>I know i can download all files on a page, but one by one is kinda slow...and downloading 4 or 5 files at time will improve the speed of the script