<commit_before><?php
error_reporting(E_ALL);
require_once("DropboxClient.php");

// you have to create an app at https://www.dropbox.com/developers/apps and enter details below:
$app_path = 	"/path/to/web/app/";
$save_path =	"/path/to/tokens/and/uploads/folders/";
$app_token = 	"";
$app_secret = 	"";
$dropbox = new DropboxClient(array(
	'app_key' => $app_token, 
	'app_secret' => $app_secret,
	'app_full_access' => true,
),'en');
	
$token_file = $save_path."tokens/".str_replace(".", "-", $_SERVER['REMOTE_ADDR']).".token";
	if(isset($_GET['deauth']) && $_GET['deauth'] == 'yes') {
			unlink($token_file);
	}
	
handle_dropbox_auth($dropbox, $save_path."tokens/"); // see below

$tokenarray = explode('"', file_get_contents($token_file));
$user_token = $tokenarray[3];
$user_secret = $tokenarray[7];
	
// if there is no upload, show the form
if(empty($_POST["fileURL"])) {
?>
	<form enctype="multipart/form-data" method="POST" action="">
	<input type="text" name="fileURL" id="name" value="Enter URL" onfocus="if (this.value=='Enter URL') this.value='';"/>
	<input type="submit" value="Transload" title="Search" >
	</form>
	<a id="unlink" href="?deauth=yes">Unlink</a>
	</div>

<?php 

} else { 
	$file_URL = $_POST["fileURL"];
	$filename_tmp = explode("/", $file_URL);
	$file_name = $filename_tmp[sizeof($filename_tmp)-1];


	$command = 'perl "'.$app_path.'drop.pl" '.$file_URL." ".$user_token." ".$user_secret." ".$app_token." ".$app_secret." \"".$app_path."\" \"".$save_path."\"";
	
	print($command);	
	
	if(strpos($file_name, "php?") !== false ||
		strpos($file_name, ".") == false){
	$retval = 2;
	} else if(strpos($file_name, ".com") !== false ||
		strpos($file_name, ".net") !== false ||
		strpos($file_name, ".org") !== false ||
		strpos($file_name, ".gov") !== false ||
		strpos($file_name, ".xxx") !== false){<commit_msg>Erased an empty line...<commit_after><?php
error_reporting(E_ALL);
require_once("DropboxClient.php");

// you have to create an app at https://www.dropbox.com/developers/apps and enter details below:
$app_path = 	"/path/to/web/app/";
$save_path =	"/path/to/tokens/and/uploads/folders/";
$app_token = 	"";
$app_secret = 	"";
$dropbox = new DropboxClient(array(
	'app_key' => $app_token, 
	'app_secret' => $app_secret,
	'app_full_access' => true,
),'en');
	
$token_file = $save_path."tokens/".str_replace(".", "-", $_SERVER['REMOTE_ADDR']).".token";
	if(isset($_GET['deauth']) && $_GET['deauth'] == 'yes') {
			unlink($token_file);
	}
	
handle_dropbox_auth($dropbox, $save_path."tokens/"); // see below

$tokenarray = explode('"', file_get_contents($token_file));
$user_token = $tokenarray[3];
$user_secret = $tokenarray[7];
	
// if there is no upload, show the form
if(empty($_POST["fileURL"])) {
?>
	<form enctype="multipart/form-data" method="POST" action="">
	<input type="text" name="fileURL" id="name" value="Enter URL" onfocus="if (this.value=='Enter URL') this.value='';"/>
	<input type="submit" value="Transload" title="Search" >
	</form>
	<a id="unlink" href="?deauth=yes">Unlink</a>
	</div>

<?php 

} else { 
	$file_URL = $_POST["fileURL"];
	$filename_tmp = explode("/", $file_URL);
	$file_name = $filename_tmp[sizeof($filename_tmp)-1];

	$command = 'perl "'.$app_path.'drop.pl" '.$file_URL." ".$user_token." ".$user_secret." ".$app_token." ".$app_secret." \"".$app_path."\" \"".$save_path."\"";
	
	print($command);	
	
	if(strpos($file_name, "php?") !== false ||
		strpos($file_name, ".") == false){
	$retval = 2;
	} else if(strpos($file_name, ".com") !== false ||
		strpos($file_name, ".net") !== false ||
		strpos($file_name, ".org") !== false ||
		strpos($file_name, ".gov") !== false ||
		strpos($file_name, ".xxx") !== false){
{'fraction_non_alphanumeric': 0.24149196841818676, 'fraction_numerical': 0.0021780560849441874, 'mean_word_length': 5.1644295302013425, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 25, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2512802', 'n_tokens_mistral': 1445, 'n_tokens_neox': 1389, 'n_words': 250}