Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $level = "Recommended";
- if (isset($_GET["v"]))
- {
- if (!strcmp($_GET["v"], "Latest"))
- {
- $level = "Latest";
- }
- }
- $type = 'Client';
- if (isset($_GET["t"]))
- {
- if (!strcmp($_GET["t"], "src"))
- {
- $type = "Source";
- }
- elseif (!strcmp($_GET["t"], "server"))
- {
- $type = "Server";
- }
- }
- $tag = file_get_contents(sprintf("http://dl.dropbox.com/u/28221422/MinecraftForge/%s.txt", $level));
- $filename = sprintf("./forge/MinecraftForge-%s-%s.zip", $tag, $type);
- $filepath = sprintf("http://dl.dropbox.com/u/28221422/MinecraftForge/MinecraftForge-%s-%s.zip", $level, $type);
- if (!file_exists($filename))
- {
- $ret == file_put_contents($filename, file_get_contents($filepath));
- if ($ret == false)
- {
- header("HTTP/1.1 301 Moved Permanently");
- header(sprintf("Location: %s", $filepath));
- return;
- }
- }
- else
- {
- header("HTTP/1.1 301 Moved Permanently");
- header(sprintf("Location: %s", $filename));
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement