heres an example of how i would do it
PHP Code:
<?PHP
$song = $_GET['song'];
$user = $_GET['user'];
$zip = new ZipArchive;
if (!file_exists($user . '.zip')) {
copy('new.zip', $user . '.zip');
}
if(isset($song)){
if ($zip->open($user . '.zip') === TRUE) {
$zip->addFile($song, $song);
$zip->close();
echo 'worked';
} else {
echo 'failsauce';
}
} else {
echo "no song selected";
}
?>
thats just a quick example, but i'd have a .zip somewhere with a txt saying 'Zip downloaded from TuneTunnel.com', and if they are a new user, copy that over for them, then add mp3's to it
also, i'd have a script that tells what files are currently in their zip, and an option to delete them, so they dont end up downloading the same songs over and over, when they add new ones
and yes, thats really ugly code
Bookmarks