10th October 2008, 22:01
|
|
VIP
|
|
Join Date: Jan 2008
Posts: 902
|
|
Quote:
Originally Posted by clocktower
/////////////////////// NFO FILE ////////////////////////
if(isset($_FILES['nfo']) && !empty($_FILES['nfo']['name'])) {
$nfofile = $_FILES['nfo'];
if ($nfofile['name'] == '')
bark("No NFO!");
if ($nfofile['size'] == 0)
bark("0-byte NFO");
if ($nfofile['size'] > 65535)
bark("NFO is too big! Max 65,535 bytes.");
$nfofilename = $nfofile['tmp_name'];
if (@!is_uploaded_file($nfofilename))
bark("NFO upload failed");
$nfo = sqlesc(str_replace("\x0d\x0d\x0a", "\x0d\x0a", @file_get_contents($nfofilename)));
}
/////////////////////// NFO FILE END /////////////////////
|
Worked a treat
Last edited by Phogo; 10th October 2008 at 22:07.
|