View Single Post
  #7  
Old 10th October 2008, 22:01
Phogo's Avatar
Phogo Phogo is offline
VIP
 
Join Date: Jan 2008
United Kingdom
Posts: 902
Default
Quote:
Originally Posted by clocktower View Post
/////////////////////// 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.
Reply With Quote