{"action":"created","issue":{"url":"https://api.github.com/repos/Maikuolan/phpMussel/issues/2","labels_url":"https://api.github.com/repos/Maikuolan/phpMussel/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/Maikuolan/phpMussel/issues/2/comments","events_url":"https://api.github.com/repos/Maikuolan/phpMussel/issues/2/events","html_url":"https://github.com/Maikuolan/phpMussel/issues/2","id":79996935,"number":2,"title":"Wish list: Archive support.","user":{"login":"Maikuolan","id":12571108,"avatar_url":"https://avatars.githubusercontent.com/u/12571108?v=3","gravatar_id":"","url":"https://api.github.com/users/Maikuolan","html_url":"https://github.com/Maikuolan","followers_url":"https://api.github.com/users/Maikuolan/followers","following_url":"https://api.github.com/users/Maikuolan/following{/other_user}","gists_url":"https://api.github.com/users/Maikuolan/gists{/gist_id}","starred_url":"https://api.github.com/users/Maikuolan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Maikuolan/subscriptions","organizations_url":"https://api.github.com/users/Maikuolan/orgs","repos_url":"https://api.github.com/users/Maikuolan/repos","events_url":"https://api.github.com/users/Maikuolan/events{/privacy}","received_events_url":"https://api.github.com/users/Maikuolan/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Maikuolan/phpMussel/labels/help%20wanted","name":"help wanted","color":"159818"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-24T00:25:39Z","updated_at":"2015-05-24T12:00:36Z","closed_at":null,"body":"- Current formats for archive metadata signatures supported are:\r\n  ZIP, BZ, LZF, GZ. Ideally, at minimum, this should also extend to RAR and 7z.\r\n- Currently, all formats for archive metadata signatures that are supported,\r\n  with exception to ZIP format, can be scanned recursively. Ideally, ability to\r\n  scan ZIP files recursively should also be supported at some point (along with\r\n  all future formats that are planned to be supported).\r\n- Help and/or suggestions as to how to go about this invited."},"comment":{"url":"https://api.github.com/repos/Maikuolan/phpMussel/issues/comments/105006797","html_url":"https://github.com/Maikuolan/phpMussel/issues/2#issuecomment-105006797","issue_url":"https://api.github.com/repos/Maikuolan/phpMussel/issues/2","id":105006797,"user":{"login":"DanielRuf","id":827205,"avatar_url":"https://avatars.githubusercontent.com/u/827205?v=3","gravatar_id":"","url":"https://api.github.com/users/DanielRuf","html_url":"https://github.com/DanielRuf","followers_url":"https://api.github.com/users/DanielRuf/followers","following_url":"https://api.github.com/users/DanielRuf/following{/other_user}","gists_url":"https://api.github.com/users/DanielRuf/gists{/gist_id}","starred_url":"https://api.github.com/users/DanielRuf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DanielRuf/subscriptions","organizations_url":"https://api.github.com/users/DanielRuf/orgs","repos_url":"https://api.github.com/users/DanielRuf/repos","events_url":"https://api.github.com/users/DanielRuf/events{/privacy}","received_events_url":"https://api.github.com/users/DanielRuf/received_events","type":"User","site_admin":false},"created_at":"2015-05-24T12:00:36Z","updated_at":"2015-05-24T12:00:36Z","body":"for ZIP this should work pretty well:\r\n\r\n```\r\n<?php \r\n$za = new ZipArchive(); \r\n\r\n$za->open('test.zip'); \r\n\r\nfor( $i = 0; $i < $za->numFiles; $i++ ){ \r\n    $stat = $za->statIndex( $i ); \r\n        if($stat['crc']!==0 && $stat['size']!==0 ) //these may be 0 if it is a directory\r\n\t$za->getFromIndex($stat['index']);\r\n} \r\n?>```\r\n\r\n\r\nand for TAR:\r\n\r\n```\r\n<?php\r\n\r\n    $p = new PharData('test.tar', 0);\r\n    foreach (new RecursiveIteratorIterator($p) as $file) {\r\n        echo $file->getFileName() . \"\\n\";\r\n        echo file_get_contents($file->getPathName()) . \"\\n\"; // display contents;\r\n\t\techo \"<br>\";\r\n    }\r\n?>\r\n```\r\n\r\nalso ZIP is supportted:\r\n\r\n```\r\n<?php\r\n\r\n    $p = new PharData('test.zip', 0);\r\n    foreach (new RecursiveIteratorIterator($p) as $file) {\r\n        $filename=$file->getFileName();\r\n        $filecontent=file_get_contents($file->getPathName());\r\n    }\r\n?>\r\n```"}}