load($_FILES['pasty']) === true) { $_fileObj->setSaveFilename(); $_fileObj->setShort(); $_fileObj->setStoragePath(); $_fileObj->setShortURL(); $_do = $_fileObj->process(); $_message = $_do['message']; if($_do['status'] === true) { $httpResponseCode = 200; if(defined('LOG_CREATION') && LOG_CREATION === true) { error_log(date("c")." ".$_message." ".SELFPASTE_UPLOAD_SECRET[$_POST['dl']]."\n",3,CREATE_LOG); } } } $contentBody = array( 'message' => $_message, 'status' => $httpResponseCode ); } header('X-PROVIDED-BY: selfpaste'); header($contentType); http_response_code($httpResponseCode); if(file_exists('view/'.$contentView.'.inc.php')) { require_once 'view/'.$contentView.'.inc.php'; } else { error_log('Content body file missing. '.var_export($_SERVER,true),3,ERROR_LOG_FILE); http_response_code(400); die('Well, something went wrong...'); }