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) { Summoner::createLog($_message." ".SELFPASTE_UPLOAD_SECRET[$_POST['dl']]); } } } $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 { Summoner::syslog('Content body file missing. '.Summoner::cleanForLog($_SERVER)); http_response_code(400); die('Well, something went wrong...'); }