/vinaget/vng262/class.php
PHP | 1206 lines | 421 code | 20 blank | 765 comment | 68 complexity | cfd4c561acfba003e6848350ee31313f MD5 | raw file
- <?php
- /*
- * Home page: http://vinaget.us
- * Blog: http://blog.vinaget.us
- * Script Name: Vinaget
- * Version: 2.6.2 (10.12.2011)
- * Description:
- - Vinaget is script generator premium link that allows you to download files instantly and at the best of your Internet speed.
- - Vinaget is your personal proxy host protecting your real IP to download files hosted on hosters like RapidShare, megaupload, hotfile...
- - You can now download files with full resume support from filehosts using download managers like IDM etc
- - Vinaget is a Free Open Source, supported by a growing community.
- * Code LeechViet by VinhNhaTrang
- * Developed by ..:: [H] ::..
- */
- ##################################### Begin class getinfo #####################################
- class getinfo {
- function config(){
- include("config.php");
- $this->self = 'http://'.$_SERVER['HTTP_HOST'].preg_replace('/\?.*$/', '', isset($_SERVER['REQUEST_URI'])? $_SERVER['REQUEST_URI'] : $_SERVER['PHP_SELF']);
- if (!defined('vinaget')){
- echo '<meta HTTP-EQUIV="Refresh" CONTENT="0; URL=http://'.$homepage.'">';
- exit;
- }
-
- if (!file_exists(".htaccess")) {
- echo "<CENTER><font color=red size=4>Can't find file <B>.htaccess</B></font></CENTER>";
- exit;
- }
- elseif (filesize(".htaccess") < 200) {
- #----------- Begin create file .htaccess -----------#
- $slashes = explode('/', $this->self);
- $max = count($slashes)-1;
- $namefolder = "";
- if($max>3) for($i=3;$i<$max;$i++) $namefolder .= "/".$slashes[$i];
- else $namefolder = "/";
- $strhta ="";
- $strhta .= "RewriteEngine on\n";
- $strhta .= "RewriteBase $namefolder\n";
- $strhta .= "RewriteCond %{REQUEST_FILENAME} !-f\n";
- $strhta .= "RewriteCond %{REQUEST_FILENAME} !-d\n";
- $strhta .= "RewriteRule ^(.*)/(.*)/ index.php?file=$2\n";
- $strhta .= "order deny,allow\n";
- $strhta .= '<files ~ "\.(php|php.*|sphp|php3|php4|php5|phtml|cgi|pl|shtml|dhtml|html|htm|txt|dat)$">';
- $strhta .= "\n";
- $strhta .= "deny from all\n";
- $strhta .= "</files>\n";
- $strhta .= "\n";
- $strhta .= "<files add.php>\n";
- $strhta .= "allow from all\n";
- $strhta .= "</files>\n";
- $strhta .= "\n";
- $strhta .= "<files index.php>\n";
- $strhta .= "allow from all\n";
- $strhta .= "</files>\n";
- $strhta .= "\n";
- $strhta .= "<files login.php>\n";
- $strhta .= "allow from all\n";
- $strhta .= "</files>\n";
- $strhta .= "\n";
- $strhta .= "<files log.txt>\n";
- $strhta .= "deny from all\n";
- $strhta .= "</files>\n";
- $strhta .= "\n";
- $strhta .= '<files ~ "^\.">';
- $strhta .= "\n";
- $strhta .= "deny from all\n";
- $strhta .= "</files>";
- $htafile = ".htaccess";
- $fhta = fopen ($htafile, "w")
- or die('<CENTER><font color=red size=3>could not open file! Try to chmod the folder "<B>.htaccess</B>" to 666</font></CENTER>');
- fwrite ($fhta, $strhta)
- or die('<CENTER><font color=red size=3>could not write file! Try to chmod the folder "<B>.htaccess</B>" to 666</font></CENTER>');
- fclose ($fhta);
- @chmod($htafile, 0666);
- #----------- End create file .htaccess -----------#
- }
- if (!file_exists ( "tmp" )) {
- mkdir("tmp", 0777)
- or die('<CENTER><font color=red size=4>Could not create folder! Try to chmod the folder "<B>tmp</B>" to 777</font></CENTER>');
- }
- if (!file_exists ( "online" )) {
- mkdir("online", 0777)
- or die('<CENTER><font color=red size=4>Could not create folder! Try to chmod the folder "<B>online</B>" to 777</font></CENTER>');
- }
- if (!file_exists ($fileinfo_dir)) {
- mkdir($fileinfo_dir, 0777)
- or die('<CENTER><font color=red size=4>Could not create folder! Try to chmod the folder "<B>files</B>" to 777</font></CENTER>');
- }
- if(!file_exists($fileinfo_dir."index.php")) {
- $clog=fopen($fileinfo_dir."index.php","a")
- or die('<CENTER><font color=red size=3>Could not create to file ! Try to chmod the folder "<B>files</B>" to 777</font></CENTER>');
- fwrite($clog,'<meta HTTP-EQUIV="Refresh" CONTENT="0; URL=http://'.$homepage.'">');
- fclose($clog);
- }
- if ($Secure == true) $this->Deny = true;
- foreach ($SecureID as $login_vng)
- if(isset($_COOKIE["secureid"]) && $_COOKIE["secureid"] == md5($login_vng)) {
- $this->Deny = false;
- break;
- }
- $this->Secure = $Secure;
- $this->fileinfo_dir = $fileinfo_dir;
- $this->fileinfo_ext = $fileinfo_ext;
- $this->download_prefix = $download_prefix;
- $this->banned = explode(' ', '.htaccess .htpasswd .php .php3 .php4 .php5 .phtml .asp .aspx .cgi .pl'); // banned filetypes
- $this->unit = 1024;
- $this->limitMBIP = $limitMBIP;
- $this->ttl = $ttl;
- $this->limitPERIP = $limitPERIP;
- $this->ttl_ip = $ttl_ip;
- $this->max_jobs_per_ip = $max_jobs_per_ip;
- $this->max_jobs = $max_jobs;
- $this->max_load = $max_load;
- $this->title = $title;
- $this->zlink = $ziplink;
- $this->link_zip = $apiadf;
- $this->colorfn = $colorfilename;
- $this->colorfs = $colorfilesize;
- $this->badword = $badword;
- $this->act = $action;
- $this->realall = $get_realall;
- $this->debridmax = $get_debridmax;
- $this->alldebrid = $get_alldebrid;
- $this->fastdebrid = $get_fastdebrid;
- $this->listfile = $listfile;
- $this->checkacc = $checkacc;
- $this->privatef = $privatefile;
- $this->privateip = $privateip;
- $this->linkcbox = $linkforcbox;
- $this->check3x = $checklinksex;
- $this->timedelcookie = $timedelcookie;
- $this->filecookie = $filecookie;
- }
- function showplugin(){
- foreach ($this->acc as $host => $value) {
- $xout = array('');
- $xout = $this->acc[$host]['accounts'];
- $max_size = $this->acc[$host]['max_size'];
- $host=str_replace("real-debrid.com",_accreal,$host) ;
- $host=str_replace("alldebrid.com",_accall,$host) ;
- $host=str_replace("debridmax.com",_accdmax,$host) ;
- $host=str_replace("fast-debrid.com",_accfast,$host) ;
- if (empty($xout[0])==false && empty($host)==false){
- $hosts[]= '<span class="plugincollst">' .$host . ' '.count($xout).'</span><br>';
- }
- }
- if(isset($hosts)){
- if(count($hosts)>4){
- for ($i=0; $i < 5; $i++) echo "$hosts[$i]";
- echo "<div id=showacc style='display: none;'>";
- for ($i=5; $i < count($hosts); $i++) echo "$hosts[$i]";
- echo "</div>";
- }
- else for ($i=0; $i < count($hosts); $i++) echo "$hosts[$i]";
- if(count($hosts)>4) echo "<a onclick=\"showOrHide();\" href=\"javascript:void(0)\" style='TEXT-DECORATION: none'><font color=#FF6600><div id='moreacc'>"._moreacc."</div></font></a>";
- }
- return false;
- }
- function clean() {
- $oldest = time() - $this->ttl*60;
- $delete = array();
- foreach ($this->jobs as $key=>$job) {
- if ($job['mtime'] < $oldest) {
- $delete[] = $key;
- }
- }
- foreach ($delete as $url) {
- unset($this->jobs[$url]);
- }
- $this->save_jobs();
- }
- function clean_cookies() {
- $this->load_cookies();
- $oldest = time() - $this->timedelcookie*60;
- $delete = array();
- foreach ($this->cookies as $ckey=>$cookies) {
- if ($cookies['time'] < $oldest) {
- $delete[] = $ckey;
- }
- }
- foreach ($delete as $site) {
- unset($this->cookies[$site]);
- }
- $this->save_cookies("","");
- }
- function getFileInfo(){
- $this->fileinfo = "";
- $dir = opendir($this->fileinfo_dir);
- $lists = array();
-
- while ($file = readdir($dir)){
- if (substr($file,-strlen($this->fileinfo_ext)-1) == "." . $this->fileinfo_ext){
- $lists[] = $this->fileinfo_dir . $file;
- }
- }
- closedir($dir);
-
- if (count($lists)){
- sort($lists);
- $this->fileinfo = array_pop($lists);
- foreach ($lists as $file){
- @unlink($file);
- }
- }
- }
- function load_jobs(){
- if (isset($this->jobs)) return;
- $this->getFileInfo();
- $this->jobs_data = @file_get_contents($this->fileinfo);
- $this->jobs = @unserialize($this->jobs_data);
- if (! is_array($this->jobs)){
- $this->jobs = array();
- $this->jobs_data = 'wtf';
- }
- }
- function save_jobs(){
- if (!isset($this->jobs))return;
- $this->getFileInfo();
- $this->fileinfo = $this->fileinfo_dir . time() . "." . $this->fileinfo_ext;
- $tmp = serialize($this->jobs);
- if ($tmp !== $this->jobs_data){
- $this->jobs_data = $tmp;
- $fh = fopen($this->fileinfo, 'w') or die('<CENTER><font color=red size=3>Could not open file ! Try to chmod the folder "<B>'.$this->fileinfo_dir.'</B>" to 777</font></CENTER>');
- fwrite($fh, $this->jobs_data);
- fclose($fh);
- @chmod($this->fileinfo, 0666);
- return true;
- }
- }
- function load_cookies(){
- if (isset($this->cookies)){
- return;
- }
- $this->cookies_data = @file_get_contents($this->fileinfo_dir.$this->filecookie);
- $this->cookies = @unserialize($this->cookies_data);
- if (! is_array($this->cookies))
- {
- $this->cookies = array();
- $this->cookies_data = 'wtf';
- }
- }
- function get_cookie($site){
- $cookie="";
- if(isset($this->cookies) && count($this->cookies)>0){
- foreach ($this->cookies as $ckey=>$cookies){
- if ($ckey === $site){
- $cookie = $cookies['cookie'];
- break;
- }
- }
- }
- return $cookie;
- }
- function save_cookies($site,$cookie){
- if (!isset($this->cookies)) return;
- if($site){
- $cookies = array(
- 'cookie' => $cookie,
- 'time' => time(),
- );
- $this->cookies[$site] = $cookies;
- }
- $tmp = serialize($this->cookies);
- if ($tmp !== $this->cookies_data){
- $this->cookies_data = $tmp;
- $fh = fopen($this->fileinfo_dir.$this->filecookie, 'w')
- or die('<CENTER><font color=red size=3>Could not open file ! Try to chmod the folder "<B>'.$this->fileinfo_dir.'</B>" to 777</font></CENTER>');
- fwrite($fh, $this->cookies_data)
- or die('<CENTER><font color=red size=3>Could not write file ! Try to chmod the folder "<B>'.$this->fileinfo_dir.'</B>" to 777</font></CENTER>');
- fclose($fh);
- @chmod($this->fileinfo_dir.$this->filecookie, 0666);
- return true;
- }
- }
- function get_load($i = 0){
- $load = array('0', '0', '0');
- if (@file_exists('/proc/loadavg')){
- if ($fh = @fopen('/proc/loadavg', 'r')){
- $data = @fread($fh, 15);
- @fclose($fh);
- $load = explode(' ', $data);
- }
- }
- else{
- if ($serverstats = @exec('uptime')){
- if (preg_match('/(?:averages)?\: ([0-9\.]+),?[\s]+([0-9\.]+),?[\s]+([0-9\.]+)/', $serverstats, $matches)){
- $load = array($matches[1], $matches[2], $matches[3]);
- }
- }
- }
- return $i==-1 ? $load : $load[$i];
- }
- function lookup_ip($ip){
- $this->load_jobs();
- $cnt = 0;
- foreach ($this->jobs as $job)
- {
- if ($job['ip'] === $ip) $cnt++;
- }
- return $cnt;
- }
- function Checkjobs() {
- $REMOTE_ADDR = $_SERVER ['REMOTE_ADDR'];
- $heute = 0;
- $xhandle = opendir ( "tmp");
- while ( $buin = readdir ($xhandle)) {
- if (stristr($buin, "$REMOTE_ADDR" )) {
- $heute++;}
- }
- return $heute;
- closedir ( $xhandle );
- }
- function get_account($service){
- $acc = '';
- if (isset($this->acc[$service])){
- $service = $this->acc[$service];
- $this->max_size = $service['max_size'];
- if(count($service['accounts'])>0) $acc = $service['accounts'][rand(0, count($service['accounts'])-1)];
- }
- return $acc;
- }
- function GetCookies($content){
- preg_match_all('/Set-Cookie: (.*);/U',$content,$temp);
- $cookie = $temp[1];
- $cookies = implode('; ',$cookie);
- return $cookies;
- }
- function lookup_job($hash){
- $this->load_jobs();
- foreach ($this->jobs as $key=>$job)
- {
- if ($job['hash'] === $hash)
- {
- $job['url'] = $key;
- return $job;
- }
- }
- return false;
- }
- }
- ##################################### End class getinfo #######################################
- ##################################### Begin class stream_get ##################################
- class stream_get extends getinfo {
- function stream_get(){
- $this->config();
- include("account.php");
- $this->load_jobs();
- Tools_get::clean_ip();
- $this->cookie = '';
- if (isset($_REQUEST['file'])) $this->download();
- if (isset($_COOKIE['owner'])){
- $this->owner = $_COOKIE['owner'];
- }
- else{
- $this->owner = intval(rand()*10000);
- setcookie('owner', $this->owner, 0);
- }
- }
- function download(){
- error_reporting (0);
- sleep(2);
- if (! $job = $this->lookup_job($_REQUEST['file'])) die(_errorget);
- if (($_SERVER['REMOTE_ADDR'] !== $job['ip']) && $this->privateip==true) die(_errordl);
- $link = '';
- $filesize= $job['size'];
- $filename = $this->download_prefix.urldecode($job['filename']);
- $directlink = urldecode($job['directlink']['url']);
- $cookies = $job['directlink']['cookies'];
- if (preg_match('#^http://([a-z0-9]+\.)?filesonic\.([a-z]+)/#', $directlink)) {
- $page = $this->curl($directlink,$cookies,"");
- if(preg_match('/Location: (.*)/', $page, $match)) $link=trim($match[1]);
- else header("HTTP/1.0 404 Not Found");
- }
- elseif (preg_match('#^http://([a-z0-9]+\.)?wupload\.com/#', $directlink)) {
- $data = $this->curl($directlink,$cookies,'');
- if(preg_match('/ocation: (.*)/', $data, $match)) $link=trim($match[1]);
- else header("HTTP/1.0 404 Not Found");
- }
- else
- $link = $directlink;
- if(!$link) die(_erroracc);
- if($filesize <=0) {
- header("HTTP/1.1 404 Not Found");
- die ("HTTP/1.1 404 Not Found");
- }
- $range = '';
- if (isset($_SERVER['HTTP_RANGE'])) {
- $range = substr($_SERVER['HTTP_RANGE'], 6);
- list($start, $end) = explode('-', $range);
- $new_length = $filesize - $start;
- # Free Download Manager Support (freedownloadmanager.org)
- if (empty($end)) {
- $range = $range . ($filesize-1);
- }
- if (empty($start)) {
- $range = "0" . $range;
- }
- }
- $schema = parse_url($link);
- $errno = 0;
- $errstr = "";
- $port = "";
- if(isset($schema['port'])) $port = $schema['port'];
- else {$port = $schema['scheme'] == 'https' ? 443 : 80;}
- $host = (($schema['scheme'] == 'https') ? 'ssl://' : '').$schema['host'];
- $fp = @stream_socket_client ($host.":".$port, $errno, $errstr, 10, STREAM_CLIENT_CONNECT );
- if (!$fp) {
- header("HTTP/1.0 404 Not Found");
- die ("HTTP/1.0 404 Not Found");
- }
- //exit;
- // Must be fresh start
- if( headers_sent() )
- die('Headers Sent');
- // Required for some browsers
- if(ini_get('zlib.output_compression'))
- ini_set('zlib.output_compression', 'Off');
- header("Pragma: public"); // required
- header("Expires: 0");
- header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
- header("Cache-Control: private",false); // required for certain browsers
- header("Content-Type: application/force-download");
- header("Content-Disposition: attachment; filename=".$filename);
- header("Content-Transfer-Encoding: binary");
- header("Accept-Ranges: bytes");
- if (empty($range)) {
- header("Content-Length: {$filesize}");
- }
- else {
- header("HTTP/1.1 206 Partial Content");
- header("Content-Length: $new_length");
- header("Content-Range: bytes $range/{$filesize}");
- }
- list($path1, $path2) = explode($schema['path'], $link);
- $path = $schema['path'].$path2;
- $data = "GET {$path} HTTP/1.1\r\n";
- $data .= "User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1\r\n";
- $data .= "Host: {$schema['host']}\r\n";
- $data .= "Accept: */*\r\n";
- $data .= $cookies ? "Cookie: ".$cookies."\r\n" : '';
- if (!empty($range)) $data .= "Range: bytes={$range}\r\n";
- $data .= "Connection: Close\r\n\r\n";
- @stream_set_timeout($fp, 2);
- fputs($fp, $data);
- fflush($fp);
- $tmp = '';
- do {
- $tmp .= stream_get_line($fp, $this->unit);
- }
- while (strpos($tmp, "\r\n\r\n" ) === false);
- $tmp = explode("\r\n\r\n", $tmp);
- if ($tmp[1]) {
- print $tmp[1];
- }
-
- while (!feof($fp) && (connection_status()==0)) {
- $recv = @stream_get_line($fp, $this->unit);
- @print $recv;
- @flush();
- @ob_flush();
- }
- fclose($fp);
- exit;
- }
- function CheckMBIP(){
- $this->countMBIP = 0;
- $this->totalMB = 0;
- $this->timebw = 0;
- $timedata =time();
- foreach ($this->jobs as $job){
- if ($job['ip'] == $_SERVER['REMOTE_ADDR']) {
- $this->countMBIP = $this->countMBIP + $job['size']/1024/1024;
- if($job['mtime'] < $timedata ) $timedata = $job['mtime'];
- $this->timebw = $this->ttl*60 + $timedata -time();
- }
- if($this->privatef==false){
- $this->totalMB = $this->totalMB + $job['size']/1024/1024;
- $this->totalMB = round($this->totalMB);
- }
- else {
- if ($job['owner'] == $this->owner) {
- $this->totalMB = $this->totalMB + $job['size']/1024/1024;
- $this->totalMB = round($this->totalMB);
- }
- }
- }
- $this->countMBIP = round($this->countMBIP);
- if ($this->countMBIP >= $this->limitMBIP) return false;
- return true;
- }
- function curl($url,$cookies,$post){
- $ch = @curl_init();
- curl_setopt($ch, CURLOPT_URL, $url);
- curl_setopt($ch, CURLOPT_HEADER, 1);
- if ($cookies) curl_setopt($ch, CURLOPT_COOKIE, $cookies);
- curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 5.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1');
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch, CURLOPT_REFERER,$url);
- if ($post){
- curl_setopt($ch, CURLOPT_POST, 1);
- curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
- }
- curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
- curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
- curl_setopt($ch, CURLOPT_TIMEOUT, 30);
- curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, 20);
- $page = curl_exec( $ch);
- curl_close($ch);
- return $page;
- }
- function cut_str($str, $left, $right) {
- $str = substr ( stristr ( $str, $left ), strlen ( $left ) );
- $leftLen = strlen ( stristr ( $str, $right ) );
- $leftLen = $leftLen ? - ($leftLen) : strlen ( $str );
- $str = substr ( $str, 0, $leftLen );
- return $str;
- }
- function GetCookies($content){
- preg_match_all('/Set-Cookie: (.*);/U',$content,$temp);
- $cookie = $temp[1];
- $cookies = implode('; ',$cookie);
- return $cookies;
- }
- function GetAllCookies($page) {
- $lines = explode("\n", $page);
- $retCookie = "";
- foreach ($lines as $val)
- {
- preg_match('/Set-Cookie: (.*)/',$val,$temp);
- if (isset($temp[1]))
- {
- if ($cook = substr($temp[1], 0, stripos($temp[1], ';')))
- $retCookie .= $cook . ";";
- }
- }
- return $retCookie;
- }
- function mf_str_conv($str_or)
- {
- $str_or = stripslashes($str_or);
- if (!preg_match("/unescape\(\W([0-9a-f]+)\W\);\w+=([0-9]+);[^\^]+\)([0-9\^]+)?\)\);eval/", $str_or, $match)) return $str_or;
- $match[3] = $match[3] ? $match[3] : "";
- $str_re = "";
- for ($i = 0; $i < $match[2]; $i++){
- $c = HexDec(substr($match[1], $i*2, 2));
- eval ("\$c = \$c".$match[3].";");
- $str_re .= chr($c);
- }
- $str_re = str_replace($match[0], stripslashes($str_re), $str_or);
- if (preg_match("/unescape\(\W([0-9a-f]+)\W\);\w+=([0-9]+);[^\^]+\)([0-9\^]+)?\)\);eval/", $str_re, $dummy))
- $str_re = $this->mf_str_conv($str_re);
- return $str_re;
- }
- function uft8html2utf8( $s ) {
- if ( !function_exists('uft8html2utf8_callback') ) {
- function uft8html2utf8_callback($t) {
- $dec = $t[1];
- if ($dec < 128) {
- $utf = chr($dec);
- } else if ($dec < 2048) {
- $utf = chr(192 + (($dec - ($dec % 64)) / 64));
- $utf .= chr(128 + ($dec % 64));
- } else {
- $utf = chr(224 + (($dec - ($dec % 4096)) / 4096));
- $utf .= chr(128 + ((($dec % 4096) - ($dec % 64)) / 64));
- $utf .= chr(128 + ($dec % 64));
- }
- return $utf;
- }
- }
- return preg_replace_callback('|&#([0-9]{1,});|', 'uft8html2utf8_callback', $s );
- }
- function main(){
- $this->clean();
- $this->load_cookies();
- $this->clean_cookies();
- if ($this->get_load() > $this->max_load){
- echo '<center><b><i><font color=red>'._svload.'</font></i></b></center>';
- return;
- }
- if (isset($_POST['urllist'])) {
- $_POST['urllist'] = str_replace("\r", "", urldecode($_POST['urllist']));
- $_POST['urllist'] = str_replace("<", "", $_POST['urllist']);
- $_POST['urllist'] = str_replace(">", "", $_POST['urllist']);
- $files = explode("\n", $_POST['urllist']);
- if($this->linkcbox){
- echo '<small style="color:#55bbff">'._linkcbox.'</small><hr /><BR>';
- echo "<center><input class='form' type='text' name='URL' size='100' onclick='javascript:this.focus();this.select()' readOnly value='[center]";
- }
- }
- if (isset($files)){
- $dlhtml = "";
- foreach ($files as $url){
- if(!$url) continue;
- if(substr($url,0,4)=='http' && strlen($url) > 10){
- if(!$this->check3x) $dlhtml .= $this->get($url);
- else{
- ################### CHECK 3X #########################
- $check3x = false;
- if(strpos($url,"|not3x")) {
- $url = str_replace("|not3x","",$url) ;
- }
- else{
- $data = $this->curl("http://www.google.com.vn/search?q=$url", "", "");
- $totalbadword = count ($this->badword);
- for($i = 0; $i < $totalbadword; $i++){
- if (stristr($data,$this->badword[$i])) {
- $check3x = true;
- break;
- }
- }
-
- }
- if($check3x !== true) $dlhtml .= $this->get($url);
- else {
- if($this->linkcbox)
- echo '[B][url=http://www.google.com.vn/search?q='.$url.'][color=red]'._sex.' [/color][color=blue]'.$url.'[/color][/b][/url][br]';
- $dlhtml .= '<B><font color=red>'._issex.' </font><a href=http://www.google.com.vn/search?q='.$url.'><font color=#00CC00>'.$url.'</font></a><br><font color=#FFCC00>'._ifnot.' </font><font color=#0066CC>'.$url.'</font><font color=#FF3300>|</font><font color=#ff9999 face=Arial>not3x</font></b><BR>';
- unset($check3x);
- }
- ################### CHECK 3X #########################
- }
- }
- else $dlhtml .= "<b><a href=".$url." style='TEXT-DECORATION: none'><font color=red face=Arial size=2><s>".$url."</s></font></a> <img src=images/chk_error.png width='15' alt='errorlink'> <font color=#ffcc33><B>"._errorlink."</B></font><BR>";
- }
- }
- if (!empty($_POST['urllist'])) {
- if($this->linkcbox) echo "[/center]'></center>\n";
- echo '<BR><hr /><small style="color:#55bbff">'._dlhere.'</small>';
- echo "<BR><CENTER>".$dlhtml."</center>";
- }
- }
- function get($url){
- $this->CheckMBIP();
- $dlhtml = "";
- if($this->timebw > 3600) $this->timebw = round($this->timebw/3600, 1)._hour;
- elseif($this->timebw > 60) $this->timebw = round($this->timebw/60, 1)._min;
- else $this->timebw = $this->timebw._sec;
- if (count($this->jobs) >= $this->max_jobs){
- $dlhtml .= ('<center><b><i><font color=red>'._manyjob.'</font></i></b></center>');
- return $dlhtml;
- }
- if ($this->countMBIP >= $this->limitMBIP){
- $dlhtml .= ('<center><b><i><font color=red>'._limitfile1.' '.round($this->limitMBIP/1024,2).' GB '._limitfile4.' '.$this->ttl.' '._limitfile3.' '._plwait.' <font color=green size=4>'.$this->timebw.'</font></font></i></b></center>');
- return $dlhtml;
- }
- if ($this->Checkjobs() >= $this->limitPERIP){
- $lasttime = time();
- $opentmp = opendir ( "tmp");
- while ( $infofile = readdir ( $opentmp ) ) {
- if ($infofile == "." || $infofile == "..") {continue;}
- if (stristr($infofile,$_SERVER['REMOTE_ADDR'])) {
- $timedl = filemtime ( "tmp/$infofile" );
- if($timedl < $lasttime ) $lasttime = $timedl;
- }
- }
- closedir ($opentmp);
- $lefttime = $this->ttl_ip*60 -time() + $lasttime;
- if($lefttime > 3600) $lefttime = round($lefttime/3600, 1)._hour;
- elseif($lefttime > 60) $lefttime = round($lefttime/60, 1)._min;
- else $lefttime = $lefttime._sec;
- $dlhtml .= ('<center><b><i><font color=red>'._limitfile1.' '.$this->limitPERIP.' '._limitfile2.' '.$this->ttl_ip.' '._limitfile3.' '._plwait.' <font color=green size=4>'.$lefttime.'</font></font></i></b></center>');
- return $dlhtml;
- }
- if ($this->lookup_ip($_SERVER['REMOTE_ADDR']) >= $this->max_jobs_per_ip){
- $dlhtml .= ('<center><b><i><font color=red>'._limitip.'</font></i></b></center>');
- return $dlhtml;
- }
- $url = trim($url);
- if (empty($url)) return;
- $Original = $url;
- $URL = "";
- $user = '';
- $pass = '';
- $cookie = '';
- $report = false;
- if((isset($_POST['use_acc']) && $_POST['use_acc']== "real_acc") || $this->realall) include ('hosts/real-debrid_com.php');
- elseif((isset($_POST['use_acc']) && $_POST['use_acc']== "alldebrid") || $this->alldebrid) include ('hosts/alldebrid_com.php');
- elseif((isset($_POST['use_acc']) && $_POST['use_acc']== "fastdebrid") || $this->fastdebrid) include ('hosts/fast-debrid_com.php');
- elseif((isset($_POST['use_acc']) && $_POST['use_acc']== "debridmax") || $this->debridmax) include ('hosts/debridmax_com.php');
- //else include ('hosts/linksnappy_com.php');
- if(!$URL){
- $download = false;
- include ("hosts/hosts.php");
- ksort($host);
- foreach ($host as $file => $site){
- $site = substr($site,0,-4);
- $site = str_replace("_",".",$site) ;
- if (preg_match('%'.$site.'%U', $url)){
- include ('hosts/'.$host[$file]);
- break;
- }
- }
- if(isset($link)) $URL = $link;
- }
- if($report) {
- return $report;
- }
- if(!$URL){
- $this->max_size = $this->max_size_other_host;
- $size_name = Tools_get::size_name($url, "");
- $filesize = $size_name[0];
- $filename = $size_name[1];
- if($size_name[0]>250) $URL=$url;
- else {
- include("checklink.php");
- return $dlhtml;
- }
- }
- if (!isset($filesize) || $filesize <= 0){
- if($URL){
- if($this->linkcbox) echo '[B][URL='.$url.'][color=blue][s]'.$url.'[/s][/color][/url] errorlink [color=red]'._problem.'[/color][/B]';
- $dlhtml .='<b><a href='.$url.' style="TEXT-DECORATION: none"><font color=red face=Arial size=2><s>'.$url.'</s></font></a> <img src=images/chk_error.png width="15" alt="errorlink"> <font color=#ffcc33 face=Arial size=2>'._problem.'</font></b><BR>';
- }
- return $dlhtml;
- }
- if($filesize >=(1024*1024*1024)) $msize = round($filesize/(1024*1024*1024), 2)." GB";
- elseif ($filesize >=(1024*1024)) $msize = round($filesize/(1024*1024), 2)." MB";
- elseif ($filesize >=1024) $msize = round($filesize/(1024), 2)." KB";
- else $msize = $filesize." B";
- $filename =urldecode($filename);
- $filename =$this->uft8html2utf8($filename);
- $filename=str_replace(".html","",$filename) ;
- $filename=str_replace(".htm","",$filename) ;
- $filename=str_replace("www","",$filename);
- $filename=str_replace("WWW","",$filename);
- $filename=str_replace("http","",$filename);
- $filename=str_replace("HTTP","",$filename);
- $filename=str_replace("'","_",$filename);
- $filename=str_replace("@","_",$filename);
- $filename=str_replace("[","_",$filename);
- $filename=str_replace("]","_",$filename);
- $filename = str_replace($this->banned, '.xxx', $filename);
- $hash = md5($_SERVER['REMOTE_ADDR'].$url);
- if ($hash === false) {
- $dlhtml .= ('<center><b><i><font color=red>'._cantjob.'</font></i></b></center>');
- return $dlhtml;
- }
- if (isset($this->jobs[$hash]) && $this->jobs[$hash]['owner']==$this->owner) {
- if($this->linkcbox)
- echo '[B][color=red]Repost Link ==> [/color][/b]';
-
- }
- elseif (($this->countMBIP+$filesize/(1024*1024)) >= $this->limitMBIP){
- $dlhtml .= ('<center><b><i><font color=red>'._limitfile1.' '.round($this->limitMBIP/1024,2).' GB '._limitfile4.' '.$this->ttl.' '._limitfile3.' '._plwait.' <font color=green size=4>'.$this->timebw.'</font></font></i></b></center>');
- return $dlhtml;
- }
- if ($filesize > $this->max_size*1024*1024) {
- if($this->linkcbox)
- echo '[B][color=blue]'.$url.'[/color][color=red] '.round($filesize/(1024*1024),2).' MB '._filebig.' [/color][color=green]'._allowed.'[/color][color=#d71f83] '.$this->max_size.' MB[/color][/b][br]';
- $dlhtml .= ('<center><b><font color=#00CC00>'.$url.'</font> <font color=red>'.round($filesize/(1024*1024),2).' MB '._filebig.' </font><font color=#3399FF>'._allowed.'</font> <font color=#FFCC00>'.$this->max_size.' MB</font></b></center>');
- return $dlhtml;
- }
- if ($filesize <= 0){
- if($URL){
- if($this->linkcbox) echo '[B][URL='.$url.'][color=blue][s]'.$url.'[/s][/color][/url] errorlink [color=red]'._problem.'[/color][/B]';
- $dlhtml .='<b><a href='.$url.' style="TEXT-DECORATION: none"><font color=red face=Arial size=2><s>'.$url.'</s></font></a> <img src=images/chk_error.png width="15" alt="errorlink"> <font color=#ffcc33 face=Arial size=2>'._problem.'</font></b><BR>';
- }
- //else include("checklink.php");
- return $dlhtml;
- }
- $job = array(
- 'hash' => substr(md5($hash), 0, 10),
- 'path' => substr(md5(rand()), 0, 5),
- 'filename' => urlencode($filename),
- 'size' => $filesize,
- 'msize' => $msize,
- 'mtime' => time(),
- 'speed' => 0,
- 'url' => urlencode($Original),
- 'owner' => $this->owner,
- 'ip' => $_SERVER['REMOTE_ADDR'],
- 'type' => 'direct',
- 'directlink' => array(
- 'url' => urlencode($URL),
- 'cookies'=> $this->cookie,
- ),
- );
- $this->jobs[$hash] = $job;
- $this->save_jobs();
- $tiam = time().rand(0,999);
- mkdir ( "tmp/$_SERVER[REMOTE_ADDR].$tiam", 0777 )
- or die('<CENTER><font color=red size=4>Could not create folder! Try to chmod the folder "<B>tmp</B>" to 777</font></CENTER>');
-
- $gach = explode('/', $_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']);
- $sv_name = "";
- for ($i=0;$i <count($gach)-1; $i++) $sv_name .= $gach[$i]."/";
- $filename = preg_replace("/( |[|])/","_",$filename);
- $linkdown = 'http://'.$sv_name.Tools_get::site_hash($url).'/'.$job['hash'].'/'.$filename;
- ##########Begin short link ############
- if(empty($this->zlink)==false && empty($this->link_zip)==false && empty($URL)==false ){
- $ch = @curl_init();
- curl_setopt($ch, CURLOPT_URL, $this->link_zip.$linkdown);
- curl_setopt($ch, CURLOPT_HEADER, 0);
- curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 5.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1');
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch, CURLOPT_TIMEOUT, 5);
- curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, 5);
- $datalink = curl_exec( $ch);
- curl_close($ch);
- if (preg_match('%(http:\/\/.++)%U', $datalink, $shortlink)) $lik = trim($shortlink[1]);
- else $lik = $linkdown;
- }
- ############ End short link ##########
- else $lik = $linkdown;
- //$lik = file_get_contents("http://vinaget.us/create.php?url=".$lik);
- if($this->linkcbox)
- echo "[b][URL=".$lik."] ".$this->title." | [color=".$this->colorfn."] ".$filename." [/color][color=".$this->colorfs."]($msize)[/color][/url][/b][br]";
- $dlhtml .= "<b><a title='kick here to download' href='$lik' style='TEXT-DECORATION: none' target='$tiam'> <font color='#00CC00'>".$filename."</font> <font color='#FF66FF'>($msize)</font></a></b><br>";
- return $dlhtml;
- }
- function datecmp($a, $b){
- return ($a[1] < $b[1]) ? 1 : 0;
- }
- function fulllist() {
- $act="";
- if($this->act['delete']==true) { $act.='<option value="del">'._del.'</option>'; }
- if($this->act['rename']==true) { $act.='<option value="ren">'._rname.'</option>';}
- if ($act != ""){
- if ((isset($_POST['checkbox'][0]) && $_POST['checkbox'][0] != null) || isset($_POST['renn']) || isset($_POST['remove'])){
- echo '<table style="width: 80%; border-collapse: collapse" border="1" align="center"><tr><td><center>';
- switch ($_POST['option']){
- case 'del': $this->deljob(); break;
- case 'ren': $this->renamejob(); break;
- }
- if (isset($_POST['renn'])) $this->renamejob();
- if (isset($_POST['remove'])) $this->deljob();
- echo "</center></td></tr></table><br>";
- }
- }
- else echo '</select>';
- $files = array();
- foreach ($this->jobs as $job) {
- if ($job['owner']!=$this->owner && $this->privatef==true) continue;
- $files[] = array(urldecode($job['url']), $job['mtime'], $job['hash'], urldecode($job['filename']),$job['size'],$job['ip'],$job['msize']);
- }
- if (count($files)==0) { echo "<Center>"._notfile."<br/><a href='$this->self'> ["._main."] </a></center>"; return;}
- echo "<script type=\"text/javascript\">function setCheckboxes(act){elts = document.getElementsByName(\"checkbox[]\");var elts_cnt = (typeof(elts.length) != 'undefined') ? elts.length : 0;if (elts_cnt){ for (var i = 0; i < elts_cnt; i++){elts[i].checked = (act == 1 || act == 0) ? act : (elts[i].checked ? 0 : 1);} }}</script>";
- echo "<center><a href=javascript:setCheckboxes(1)> Check All </a> | <a href=javascript:setCheckboxes(0)> Un-Check All </a> | <a href=javascript:setCheckboxes(2)> Invert Selection </a></center><br>";
- echo "<center><form action='$this->self' method='post' name='flist'><select onchange='javascript:void(document.flist.submit());'name='option'>";
- if ($act == "") echo "<option value=\"dis\"> "._acdis." </option>"; else echo '<option selected="selected">'._ac.'</option>'.$act;
- echo '</select>';
- echo '<div style="overflow: auto; height: auto; max-height: 450px; width: 800px;"><table id="table_filelist" class="filelist" align="left" cellpadding="3" cellspacing="1" width="100%"><thead><tr class="flisttblhdr" valign="bottom"><td id="file_list_checkbox_title" class="sorttable_checkbox"> </td><td class="sorttable_alpha"><b>'._name.'</b></td><td><b>'._Original.'</b></td><td><b>'._Size.'</b></td><td><b>'._Date.'</b></td></tr></thead><tbody>
- ';
- usort($files, array($this, 'datecmp'));
- $data = "";
- foreach ($files as $file){
- $timesec = time() - $file[1];
- if($timesec > 24*3600) $timeago = round($timesec/86400,1)." "._dayago ;
- elseif($timesec > 3600) $timeago = round($timesec/3600,1)." "._hourago ;
- else $timeago = round($timesec/60,1)." "._minago ;
- if (strlen($file[3]) > 80) $file[3]= substr($file[3],0,70);
- $data .= "<tr class='flistmouseoff' align='center'><td><input name='checkbox[]' value='$file[2]+++$file[3]' type='checkbox'></td><td><a href='".Tools_get::site_hash($file[0])."/$file[2]/$file[3]' style='font-weight: bold; color: rgb(0, 0, 0);'>$file[3]</a></td><td><a href='$file[0]' style='color: rgb(0, 0, 0);'>"._Original."</a></td><td title='$file[5]'>".$file[6]."</td><td><a href=http://www.google.com.vn/search?q=$file[0] title='"._kickcheck."' target='$file[1]'><font color=#000000>$timeago</font></a></center></td></tr>";
- }
- //$this->CheckMBIP();
- echo $data;
- $totalall = $this->totalMB;
- if($totalall >= 1024) $totalall = round($totalall/1024, 1)." GB";
- else $totalall = $totalall." MB";
- $MB1IP = $this->countMBIP;
- if($MB1IP >= 1024) $MB1IP = round($MB1IP/1024, 1)."GB";
- else $MB1IP = $MB1IP."MB";
- $thislimitMBIP = round($this->limitMBIP/1024,0);
- if($this->ttl >= 24*60) $timereset = round($this->ttl/1440,1)." "._Total5 ;
- elseif($this->ttl >= 60) $timereset = round($this->ttl/60,1)." "._Total4 ;
- else $timereset = $this->ttl." "._Total3 ;
-
- echo "</tbody><tbody><tr class='flisttblftr'><td> </td><td>"._Total.":</td><td></td><td>$totalall</td><td> </td></tr></tbody></table>
- </div></form><center><b>"._Total1." $MB1IP/$thislimitMBIP GB - "._Total2." $timereset</b></center><br/>";
- //echo "<center><br><a href='$this->self'> [Back to main] </a> <a href='#'> [Back to top]</a></center>";
- }
- function deljob(){
- if($this->act['delete']==false) return;
- if (isset($_POST['checkbox'])){
- echo "<form action='$this->self' method='post'>";
- for ($i=0; $i < count($_POST['checkbox']); $i++){
- $temp = explode("+++",$_POST['checkbox'][$i]);
- $ftd = $temp[0];
- $name = $temp[1];
- echo "<br><b> $name </b>";
- echo '<input type="hidden" name="ftd[]" value="'.$ftd.'" />';
- echo '<input type="hidden" name="name[]" value="'.$name.'" />';
- }
- echo "<br><br><input type='submit' value='"._del."' name='remove'/> <input type='submit' value='"._canl."' name='Cancel'/><BR><BR>";
- }
- if (isset($_POST['remove'])){
- echo "<BR>";
- for ($i=0; $i < count($_POST['ftd']); $i++){
- $ftd = $_POST['ftd'][$i];
- $name = $_POST['name'][$i];
- $key = "";
- foreach ($this->jobs as $url=>$job){
- if ($job['hash'] == $ftd){
- $key = $url;
- break;
- }
- }
- if($key){
- unset($this->jobs[$key]);
- echo "<center>File: <b>$name</b> "._deld;
- }
- else echo "<center>File: <b>$name</b> "._notF;
- echo "</center>";
- }
- echo "<BR>";
- $this->save_jobs();
- }
- if (isset($_POST['Cancel'])){
- $this->fulllist();
- }
- }
- function renamejob(){
- if($this->act['rename']==false) return;
- if (isset($_POST['checkbox'])){
- echo "<form action='$this->self' method='post'>";
- for ($i=0; $i < count($_POST['checkbox']); $i++){
- $temp = explode("+++",$_POST['checkbox'][$i]);
- $name = $temp[1];
- echo "<br><b> $name </b>";
- echo '<input type="hidden" name="hash[]" value="'.$temp[0].'" />';
- echo '<input type="hidden" name="name[]" value="'.$name.'" />';
- echo '<br>'._nname.': <input type="text" name="nname[]" value="'.$name.'"/ size="70"><br />';
- }
- echo "<br><input type='submit' value='"._rname."' name='renn'/> <input type='submit' value='"._canl."' name='Cancel'/><BR><BR>";
- }
- if (isset($_POST['renn'])){
- for ($i=0; $i < count($_POST['name']); $i++)
- {
- $orname = $_POST['name'][$i];
- $hash = $_POST['hash'][$i];
- $nname = $_POST['nname'][$i];
- $nname = str_replace($this->banned,'',$nname);
- if ($nname == "") { echo "<BR>"._bname."<BR><BR>"; return; }
- else {
- echo "<br>";
- $key = "";
- foreach ($this->jobs as $url=>$job){
- if ($job['hash'] == $hash){
- $key = $url;
- $jobn = array(
- 'hash' => $job['hash'],
- 'path' => substr(md5(rand()), 0, 5),
- 'filename' => urlencode($nname),
- 'size' => $job['size'],
- 'msize' => $job['msize'],
- 'mtime' => $job['mtime'],
- 'speed' => 0,
- 'url' => $job['url'],
- 'owner' => $job['owner'],
- 'ip' => $job['ip'],
- 'type' => 'direct',
- 'directlink' => array(
- 'url' => $job['directlink']['url'],
- 'cookies'=> $job['directlink']['cookies'],
- ),
- );
- }
- }
- if($key){
- $this->jobs[$key] = $jobn;
- $this->save_jobs();
- echo "File <b>$orname</b> "._rnameto." <b>$nname</b>";
- }
- else echo "File <b>$orname</b> "._notF;
- echo "<br><br>";
- }
- }
- }
- if (isset($_POST['Cancel'])){
- $this->fulllist();
- }
- }
- }
- ##################################### End class stream_get ###################################
- ##################################### Begin class Tools_get ###################################
- class Tools_get {
- function clean_ip() {
- $xhandle = opendir ("tmp");
- while ($buin = readdir ($xhandle)) {
- if ($buin == "." || $buin == "..") {
- continue;
- }
- $xd = filemtime ( "tmp/$buin" );
- $altr = time() - $this->ttl_ip*60;
- if ($xd < $altr ) {
- if (is_dir ( "tmp/$buin" )){
- rmdir ( "tmp/$buin" );
- } else {
- unlink ( "tmp/$buin" );
- }
- }
- }
- closedir ( $xhandle );
- }
- function useronline() {
- $useronline = 0;
- if(!file_exists("online/".$_SERVER['REMOTE_ADDR'])) mkdir ( "online/".$_SERVER['REMOTE_ADDR'], 0777 ) or die('<CENTER><font color=red size=4>Could not create folder! Try to chmod the folder "<B>online</B>" to 777</font></CENTER>');
- $openfolder = opendir ("online");
- while ($folder = readdir ($openfolder)) {
- if ($folder == "." || $folder == "..") continue;
- if(file_exists("online/$folder")){
- $filemtime = filemtime ("online/$folder" );
- $timedel = $filemtime + 30;
- if (time() > $timedel ) {
- if (is_dir ( "online/$folder" )){
- rmdir ( "online/$folder" );
- } else {
- unlink ( "online/$folder" );
- }
- }
- else $useronline++;
- }
- }
- closedir ( $openfolder );
- return $useronline;
- }
- function size_name($link,$cookie){
- if(!$link) return;
- $schema = parse_url($link);
- list($path1, $path2) = explode($schema['path'], $link);
- $path = $schema['path'].$path2;
- $data = "GET {$path} HTTP/1.1\r\n";
- $data .= "User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1\r\n";
- $data .= "Host: {$schema['host']}\r\n";
- $data .= $cookie ? "Cookie: $cookie\r\n" : '';
- $data .= "Connection: Close\r\n\r\n";
- $errno = 0;
- $errstr = "";
- $port = "";
- if(isset($schema['port'])) $port = $schema['port'];
- else {$port = $schema['scheme'] == 'https' ? 443 : 80;}
- $host = (($schema['scheme'] == 'https') ? 'ssl://' : '').$schema['host'];
- $fp = @stream_socket_client ($host.":".$port, $errno, $errstr, 10, STREAM_CLIENT_CONNECT );
- if (! $fp) return -1;
- fputs ( $fp, $data );
- fflush ( $fp );
- $header = "";
- do {
- $header .= fgets ( $fp, 8192 );
- } while ( strpos ( $header, "\r\n\r\n" ) === false );
- if(stristr($header,"TTP/1.0 200 OK") || stristr($header,"TTP/1.1 200 OK") || stristr($header,"TTP/1.1 206"))
- $filesize = trim ($this->cut_str ( $header, "Content-Length:", "\n" ) );
- else $filesize = -1;
- $filename = "";
- if(stristr($header,"filename")) {
- $filename = trim ($this->cut_str ( $header, "filename", "\n" ) );
- //$filename=str_replace("\"","",$filename);
- $filename = preg_replace("/(\"|=|\*|UTF-8|\')/","",$filename);
- }
- else $filename = substr(strrchr($link, '/'), 1);
- return array($filesize,$filename);
- }
- function site_hash($url){
- if(strpos($url,"rapidshare.com")) $site = "RS"; //rename_prefix
- else if(strpos($url,"megaupload.com")) $site = "MU";
- else if(strpos($url,"filefactory.com")) $site = "FF";
- else if(strpos($url,"fileserve.com")) $site = "FS";
- else if(strpos($url,"hotfile.com")) $site = "HF";
- else if(strpos($url,"megavideo.com")) $site = "MV";
- else if(strpos($url,"netload.in")) $site = "NL";
- else if(strpos($url,"filesonic.com")) $site = "FSN";
- else if(strpos($url,"depositfiles.com"))$site = "DF";
- else if(strpos($url,"uploading.com"))$site = "ULD";
- else if(strpos($url,"easy-share.com")) $site = "E-S";
- else if(strpos($url,"filesonic")) $site = "FSN";
- else if(strpos($url,"mediafire.com")) $site = "MF";
- else {
- $schema = parse_url($url);
- $site = preg_replace("/(www.|.com|.net|.biz|.info|.org|.us|.vn|.jp|.fr|.in|.to)/","",$schema['host']);
- }
- return $site;
- }
- function report($url,$reason){
- if($reason == "dead"){
- if($this->linkcbox) echo '[B][URL='.$url.'][color=blue][s]'.$url.'[/s][/color][/url] errorlink [color=red]'._dead.'[/color][/B][/center]\'></center><BR/>';
- $report ='<b><a href='.$url.' style="TEXT-DECORATION: none"><font color=red face=Arial size=2><s>'.$url.'</s></font></a> <img src=images/chk_error.png width="15" alt="errorlink"> <font color=#ffcc33 face=Arial size=2>'._dead.'</font></b><BR>';
- return $report;
- }
- elseif($reason == "filebig"){
- if($this->linkcbox)
- echo '[B][color=blue]'.$url.'[/color][color=red] '._filebig.' [/color][color=green]'._allowed.'[/color][color=#d71f83] 200 MB[/color][/b][br]';
- $report = '<center><b><font color=#00CC00>'.$url.'</font> <font color=red> '._filebig.' </font><font color=#3399FF>'._allowed.'</font> <font color=#FFCC00>200 MB</font></b></center>';
- return $report;
- }
- elseif($reason == "erroracc"){
- if($this->linkcbox)
- echo '[B][URL='.$link.'][color=green]'.$link.'[/color][/url] gооd_lіnk [color=#d71f83]'.$matches[1].'[/color] [color=red]'._notwork.'[/color][/B]';
- $report = '<center><B><a href='.$link.' style="TEXT-DECORATION: none"><font color=#00FF00 face=Arial size=2>'.$link.'</font></a> <img src=images/chk_good.png width="13" alt="gооd_lіnk"> | <font color=#ffcc33 face=Arial size=2>'.$matches[1].'</font><font color=red face=Arial size=2> '._notwork.'</font></B></center>';
- return $report;
- }
- elseif($reason == "svload"){
- if($this->linkcbox)
- echo '[B][color=red]==► '._svload.' [/color][/b][br]';
- $report = '<center><b><font color=red> '._svload.' </font></b></center>';
- return $report;
- }
- elseif($reason == "captchafsn"){
- if($this->linkcbox) echo '[B][color=red]'._captcha.'[/color][/b][/center]\'><BR/>';
- $report ='
- <h1>Attention!</h1>
- <p><font color=red>We have detected some suspicious behaviour coming from your IP address (<B>'.$_SERVER['REMOTE_ADDR'].'</B>) and have been temporarily blocked. </font></p>
- <script type="text/javascript" src="http://www.google.com/recaptcha/api/js/recaptcha_ajax.js"></script>
- <div id="captchaVerification" class="section CL3">
- <h3><span>Please Enter Captcha: </span></h3>
- <form action="http://www.filesonic.com/report.php" method="post" id="captchaForm">
- <img src="http://www.google.com/recaptcha/api/image?c='.$url.'"><BR>
- <input type="text" name="recaptcha_response_field" value=""/ size="44" maxlength="50">
- <input type="hidden" name="recaptcha_challenge_field" value="'.$url.'" />
- <input type="submit" value="submit"/></form>
- </div>';
- return $report;
- }
- elseif($reason == "passmu"){
- if($this->linkcbox) echo '[B][color=red]'._reportpass.'[/color][/b][BR]';
- $report = "<center>"._reportpass."<form action='index.php' method='post'><BR>
- <input type='text' id='password' name='password' width='500px'/><BR><BR>
- <input type=submit value='"._sbdown."' /></form><BR>
- </form></center>
- ";
- return $report;
- }
- elseif($reason == "captchawu"){
- if($this->linkcbox) echo '[B][color=red]'._captcha.'[/color][/b][/center]\'><BR/>';
- $report ='
- <h1>Attention!</h1>
- <p><font color=red>We have detected some suspicious behaviour coming from your IP address (<B>'.$_SERVER['REMOTE_ADDR'].'</B>) and have been temporarily blocked. </font></p>
- <script type="text/javascript" src="http://www.google.com/recaptcha/api/js/recaptcha_ajax.js"></script>
- <div id="captchaVerification" class="section CL3">
- <h3><span>Please Enter Captcha: </span></h3>
- <form action="http://www.wupload.com/report.php" method="post" id="captchaForm">
- <img src="http://www.google.com/recaptcha/api/image?c='.$url.'"><BR>
- <input type="text" name="recaptcha_response_field" value=""/ size="44" maxlength="50">
- <input type="hidden" name="recaptcha_challenge_field" value="'.$url.'" />
- <input type="submit" value="submit"/></form>
- </div>';
- return $report;
- }
- else {
- if($reason == "Unavailable") $reason = _Unavailable;
- elseif($reason == "disabletrial") $reason = _disabletrial;
- elseif($reason == "Adult") $reason = _Adult;
- elseif($reason == "youtube_captcha") $reason = _ytb_captcha;
- elseif($reason == "ErrorLocating") $reason = _ytb_Error;
- if($this->linkcbox) echo '[B][URL='.$url.'][color=blue]'.$url.'[/color][/url] errorlink [color=red]'.$reason.'[/color][/B]';
- $report ='<b><a href='.$url.' style="TEXT-DECORATION: none"><font color=red face=Arial size=2>'.$url.'</font></a> <img src=images/chk_error.png width="15" alt="errorlink"> <font color=#ffcc33 face=Arial size=2>'.$reason.'</font></b><BR>';
- }
- return $report;
- }
- }
- ##################################### End class Tools_get #####################################
- ?>