1
Ok I don't really want to waste any more time on investigating this but I do want to offer a .tar option for download instead of just zip.
$archive = "/home/stevenbu/public_html/temp/".$twitter_name.".tar";
$directory = "/home/stevenbu/public_html/temp/".$twitter_name;
exec("tar -cf $archive $directory");
The problem is that when I extract the .tar it is 5 folders deep I would like no folders and just the files in the .tar
Many thanks
Not really a PHP question, more of a tar question. – AJ. – 2011-05-23T13:31:54.133
and tar doesn't have a 'junk folders' option... – pavium – 2011-05-23T13:37:49.023
While not directly related to your question, always consider the possibility that someone enters
$(rm -rf ~)
as their Twitter name. – user1686 – 2011-05-23T15:00:09.937@AJ It is PHP related as it's run from php exec and not directly. Which does make a difference in certain situations.
@grawity Thanks for the heads up, but Twitter would not let you have that name and users must authenticate with twitter to use the script. The twitter name comes from me not from them. – StevenBullen – 2011-05-23T15:13:51.147