Harry
2008-09-26 12:41:47
http://www.hy71194.mgatesphoto.com/files/index.php
Have fun! :D
~ Hy71194
Sause/"Source" : http://www.srl-forums.com/forum/showpost.php?p=503145&postcount=33
2008-09-26 12:41:47
2008-09-26 13:12:37
2008-09-26 16:16:18
From: Mylesmadness
Mines better :p
http://www.pspsquare.com/upload/
2008-09-26 16:27:09
From: BuckleyindahouseWe have the same. But, just to be better I will increase it by one. Count it! One kb
You have smaller upload limits.
2008-09-26 16:30:51
2008-09-26 16:34:00
2008-09-26 16:38:22
2008-09-26 16:45:53
From: Mylesmadness
What do you think is a good size
2008-09-26 16:50:32
2008-09-26 17:09:01
From: Markus15 gigs, that would fill my server in less then one upload.
Someone who can make a 15gb upload? :D
2008-09-26 17:12:33
2008-09-26 17:41:11
2008-09-26 17:44:34
From: Mylesmadness
My uploader increased to 50 mb per upload
2008-09-26 19:07:30
From: heavenzeyez1As long as you don't use it like crazy like game client hosting it should be fine.
Ouch, it's really good!
Don't you think that your server might crash now? :rolleyes:
~Eerik~
2008-09-26 19:09:48
From: heavenzeyez1As long at its not like posted everywhere it should be fine
Ouch, it's really good!
Don't you think that your server might crash now? :rolleyes:
~Eerik~
2008-10-07 19:11:22
2008-10-07 19:14:38
2008-10-07 19:31:50
2008-10-08 09:00:08
2008-10-08 11:01:47
2008-10-08 11:43:04
2008-10-08 15:28:40
2008-10-08 15:45:35
From: ScaperWith mine is spits out a link after the file is uploaded
ok so if i upload a file how do i get iit back when i want it>???
any 1 help please??
2008-10-10 18:44:23
From: Mylesmadness
Mines better :p
http://www.pspsquare.com/upload/
From: Mylesmadness
My uploader increased to 50 mb per upload
From: Mylesmadness
With mine is spits out a link after the file is uploaded
2008-10-10 20:58:12
2008-10-10 21:24:07
From: gl3nni
ROfl, lets advertise for porn too :D
2008-10-11 20:00:39
2008-10-13 16:50:56
2008-10-14 14:50:43
2008-10-18 18:33:00
From: fastler
Thats nice and all but is this just a "Here use my file uploader!"? or is someone going to show some source so we can all learn some php?
I kinda made one myself but I'd like to see some amazing ideas that other people came up with…
*whistles* no I'm not trying to steal source (JK I won't…)
2008-10-18 18:39:25

2008-10-18 19:23:14
2008-11-22 22:47:11
2009-02-09 18:41:49
2009-02-09 18:44:30
2009-02-09 20:10:42
2009-02-09 23:41:48
2009-02-10 01:18:52
2009-04-01 19:47:41
2009-04-01 19:48:52
From: Scaper
ummm hope this isnt a grave dig but anyway i came back here through your sig
well i need the source again but it is hosted on srl server please can you pm me the source please
From: Harry
C-C-Combobreaker.
Anyways Swift, the upload probably timed out, or it was too big.
Any here's the source anyways >_< Don't bash it or find my bugs and abuse them :p
[php]
<?php
// Define your reCAPTCHA public/private keys here.
$r_public = "GET YOUR OWN RECAPTCHA KEY";
$r_private = "GET YOUR OWN RECAPTCHA KEY";
// Paths for stuff.
$file_path = "./upload"; // Do not touch
$IP_ADDR = $_SERVER['REMOTE_ADDR']; // Gets IP Address of user
$CONTACT_LOC = "http://hy71194.mgatesphoto.com/contact.php"; // Full location to PHP contact script. OR mailto:[your email address].
/////////////////
// – End Setup –//
/////////////////
// Path/filename of the reCAPTCHA library.
require_once "recaptcha/recaptchalib.php";
// Generates a string of n characters in length.
function genString($length = 4)
{
// This holds the generated string.
$str = "";
// These are the characters we will allow in a filename.
$charset = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
// Filenames can't be less than this many characters in length.
if ($length < 1)
{
$length = 1;
}
// Generate each character in the string.
for ($i = 0; $i < $length; $i++)
{
$pos = mt_rand(0, strlen($charset));
$str .= $charset{$pos};
}
return $str;
}
// Checks to make sure file type is one of the allowed mime-types.
// Returns true if type is okay, false otherwise.
function checkMime($m_type)
{
// Define a list of mime types that we will allow.
$allowed_types = array(
"image/gif", // GIF Image
"image/jpeg", // JPEG Image
"image/png", // PNG Image
"audio/mpeg", // MP3 Audio
"audio/mp4", // MP4 Audio
"audio/wav", // WAV Audio
"video/mp4", // MP4 Video
"audio/3gpp", // 3GP [mobile content] Audio
"video/3gpp", // 3GP Video
"application/x-rar-compressed", // WinRAR Archive
"application/zip", // WinZip archive
"application/x-shockwave-flash", // SWF
"text/x-java", // JAVA file
"text/plain", // Text file
"application/msword", // MS Word file
"application/pdf", // pdf document
"application/x-bittorrent", // bittorrent files
"unknown/unknown" // .SCAR files [possibably unsafe!?]
); // Any other suggestions?! ;D
// Is the uploaded file's mime type okay?
if (in_array($m_type, $allowed_types))
{
return true;
}
else
{
return false;
}
}
function allowedIP($IP_ADDR)
{
// Define a list of mime types that we will allow.
$blocked_types = array(
"74.208.16.54"
);
if (in_array($IP_ADDR, $blocked_types))
{
return false;
}
else
{
return true;
}
}
// Validates a reCAPTCHA
// returns true on success, false otherwise.
function validateCaptcha($priv_key)
{
$r_resp = recaptcha_check_answer($priv_key,
$_SERVER["REMOTE_ADDR"],
$_POST["recaptcha_challenge_field"],
$_POST["recaptcha_response_field"]);
if ($r_resp->is_valid)
{
return true;
}
else
{
return false;
}
}
// Uploads (moves) a file to a specified location.
function uploadFile($real_file, $tmp_file, $location)
{
if (move_uploaded_file($tmp_file, $location . "/" . $real_file))
{
return true;
}
else
{
return false;
}
}
// Before we do anything, check to make sure that the upload path exists.
if (!file_exists($file_path))
{
die("<strong>" . $file_path . "</strong> doesn't exist. Please create it?");
}
// Is the file path readable?
if (!is_readable($file_path))
{
die("<strong>" . $file_path . "</strong> isn't readable. Please check your permissions.");
}
// Is the file path writable?
if (!is_writable($file_path))
{
die("<strong>" . $file_path . "</strong> isn't writable. Please check your permissions.");
}
$ip_check = (allowedIP($IP_ADDR) === true) ? "OK": "FAILED";
if ($ip_check != "OK")
{
die("<strong>Your IP address, ". $IP_ADDR .", is blocked from using this program.<br>Please <a href=$CONTACT_LOC>contact me</a> if you think you that have reatched this in error.</strong>");
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Simple File Uploader by Hy71194</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<META NAME="Description" CONTENT="Quick and easy file uploader tool by Hy71194">
</head>
<body>
<?php
if (isset($_POST) && !empty($_FILES))
{
// Check the reCAPTCHA input
$c_check = (validateCaptcha($r_private) === true) ? "OK": "FAILED";
// Get the extension of the uploaded file. This will be appended to the filename.
$ext = strtolower(substr($_FILES['image_file']['name'], strrpos($_FILES['image_file']['name'], '.') + 1));
// Our new generated filename.
$new_filename = $_FILES['image_file']['name'] . $IP_ADDR . genString() . "." . $ext;
// Check to see if the file's mime type is valid.
$m_check = (checkMime($_FILES['image_file']['type']) === true) ? "OK" : "FAILED";
// Double-check that their IP is allowed.
$ip_check = (allowedIP($IP_ADDR) === true) ? "OK": "FAILED";
echo "<div class=\"status\">";
echo "Original filename: " . $_FILES['image_file']['name'] . "<br>";
echo "Random filename: " . $new_filename . "<br>";
echo "Mime-type: " . $_FILES['image_file']['type'] . " - Result: " . $m_check . "<br>";
echo "reCAPTCHA answer: " . $c_check . "<br>";
echo "IP Address Allowed: " . $ip_check ."<br><br>";
// Attempt to move the uploaded file if the checks above are successful.
if ($m_check == "OK" && $c_check == "OK" && $ip_check == "OK")
{
$result = uploadFile($new_filename, $_FILES['image_file']['tmp_name'], $file_path);
$upload_status = ($result === true) ? "OK" : "FAILED" ;
echo "<span style='font-size:14.0pt;font-family:Tahoma'><b>The upload was a success!</span><br> View your file here..: <a href=\"http://www.hy71194.mgatesphoto.com/files/upload/$new_filename\">http://www.hy71194.mgatesphoto.com/files/upload/$new_filename</a><br/></b>";
echo "<a href=\"$_SERVER[PHP_SELF]\">Click here if you want to upload more files :)</a>\n";
}
else
{
echo "<span style='font-size:14.0pt;font-family:Tahoma'><br>File upload <b>Failed!</b>…</span> <br>Look at the four lines above and make sure you: <br><b> 1.) </b>Have an allowable file type? (look back for all allowed types; if you need a different mime-type allowed, please contact me) <br><b> 2.) </b>You answered the CAPTCHA correctly?, <br><b> 3.) </b>That your file size is not too large to be uploaded here, and <br><b> 4.) </b>Your IP address is not blocked.<br><br>";
echo "<a href=\"$_SERVER[PHP_SELF]\">Click here to retry.</a><br>";
echo "If you still need assistance, please <a href=$CONTACT_LOC>contact me</a>.<br>";
}
echo "</div>";
}
else
{
?>
<span style='font-size:24.0pt;font-family:Tahoma'>Simple File Uploader by Hy71194</span><br><br>
<span style='font-size:12.3pt;font-family:Tahoma'>
Upload a file, and this script will generate a random filename for it, and host it on this server.<br>
Maximum allowed file size is <b>50MB</b> (52,428,800 bytes)<br>
<b>Allowed file types:</b> *.png, jpg, png, mp3, mp4, 3gp, rar, zip, swf, java, txt, doc, pdf, torrent, scar<br><br>
<b>Browse for, select, and then upload your file!</b><br>
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" enctype="multipart/form-data" >
<input type="hidden" name="MAX_FILE_SIZE" value=" 52428800" />
<input type="file" name="image_file" size="35" />
<?php echo recaptcha_get_html($r_public); ?>
<input type="submit" name="submit" value="Click here to Upload your file!" /><br>By uploading a file here, you agree to the Terms of Service found <a href="http://www.hy71194.mgatesphoto.com/files/ToS.html">here</a>.
</form><br>
<?
}
?>
</body>
</span>
</html>
<br><iframe Longdesc="HitCounter" width="100%" scrolling=auto style="border:0" src="http://www.hy71194.mgatesphoto.com/index.html" target="_parent"><br><b>Please download a browser that supports iframes, such as <a href="http://www.firefox.com">Mozilla Firefox</a>.</b><noscript><br>Please also enable Javascript to view most sites correctly.</iframe>
[/php]
Enjoy ;)