Upload File

By ZabuzaMomochi on Dec 31, 2006

The instructions are in the code

/*
First make a file called 'upload.htm'
put the following code in it
*/
<html>
<body>

</body>
</html>
/*
Then, make a file called 'Upload.php'
and put the following code in that
*/

/*
Upload the two pages to your site, and go to the 'Upload.php'
You can edit this code any way you like, just remember to give credits to me!!
*/

Comments

Sign in to comment.
Sapphy   -  Sep 26, 2008

Can you repost it? :)

 Respond  
Undefined_Variable   -  Mar 08, 2008

It sounds like it was a really good script
the php probably got parsed and commented out or maybe it was seen as JavaScript. I don\'t know, but this seems like a really good script :D

 Respond  
wizkidweb16   -  Feb 01, 2008

Yeah, the code just vanished. I really want this script.

 Respond  
ZabuzaMomochi   -  May 29, 2007

..Wtf happened? Why is everything gone..?

 Respond  
Noutrious   -  May 29, 2007

peterpowell, i think he removed part of the code.

 Respond  
peterpowell   -  Apr 10, 2007

/
First make a php file called \'upload.htm\'
put the following code in it
/

isnt that a html file if the extension is .htm

;)

 Respond  
tye   -  Dec 31, 2006

There\'s also an error in your if statement that checks the type/size, it will accept a gif image of any size. It should be:

if ( (($_FILES[\"file\"][\"type\"] == \"image/gif\") || ($_FILES[\"file\"][\"type\"] == \"image/jpeg\")) && ($_FILES[\"file\"][\"size\"] < 20000))

 Respond  
tye   -  Dec 31, 2006

It\'s not always a good idea to rely on $_FILES[][\'type\'] because this is simply the MIME type the client browser has given. This can potentially be faked by a client and browsers can also report the incorrect MIME type or give a generic MIME type.

You can use the getimagesize() function to get the MIME type of an image:

list($x,$x,$mime_type) = getimagesize($_FILES[\'files\'][\'tmp_name\']);

if ($mime_type == \'image/jpeg\' || $mime_type == \'image/gif\' || $mime_type == \'image/png\') {
....

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.