Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if ($handle = opendir('./mods')) {
- while (false !== ($entry = readdir($handle))) {
- if ($entry != "." && $entry != "..") {
- $size = filesize($entry);
- $md5file = md5_file($entry);
- /*
- Warning: filesize(): stat failed for .AppleSkin-mc1.12-1.0.9.jar. in C:\xampp\htdocs\launcher\md5.php on line 20
- Warning: md5_file(AppleSkin-mc1.12-1.0.9.jar): failed to open stream: No such file or directory in C:\xampp\htdocs\launcher\md5.php on line 21
- */
- echo '{
- "id": "forgelin:forgelin:1.8.2",
- "name": "Forgelin",
- "type": "ForgeMod",
- "artifact": {
- "size": '.$size.',
- "MD5": "24d77945801cc648257f9066b461a040",
- "url": "http://localhost/launcher/mods/'.$entry.'
- }
- },';
- echo "<br>";
- echo "$entry\n";
- }
- }
- closedir($handle);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement