View Single Post
  #3  
Old 19th October 2008, 12:04
Krypto Krypto is offline
Retired from BVList
 
Join Date: Jan 2008
P2P
Posts: 510
Default
Or another alternative from ColdFusion in takeupload.php replace original nfo part with the below.

Quote:
Originally Posted by ColdFusion
Sorry if i'm hijacking the thread, but I saw this and dug out an old takeupload.php. I remember that I just overwrote the NFO part to make it either/or because otherwise you have to take care of the $nfo variable inside the INSERT query.
PHP Code:
$nfo '';
/////////////////////// 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 ///////////////////// 

Last edited by Krypto; 19th October 2008 at 13:56.
Reply With Quote