Im not sure if its possible or not but Im looking for a PHP script to copy an entire website so that I can save it on my local server and view it when internet is not at my disposal So pretty much something like
<?php
function copyDir($source,$dest) {
if(is_file($source)) {
$cpy= copy($source, $dest);
return $cpy;
}
if(!is_dir($dest)) {
mkdir ($dest); }
$dir= dir($source);
while (false !== $entry = $dir->read()) {
if ($entry == "." || $entry == "..") {
continue; }
if ($dest !== "$source/$entry") {
copyDir("$source/$entry", "$dest/$entry");
}
}
$dir->close();
return true;
} ?>
But to copy a website instead of a directory.... I hope that makes sense