Using Default Login.
\n"; } else $default_acc = false; if (empty($_REQUEST['action']) || $_REQUEST['action'] != 'FORM') { echo "\n"; echo "\t\n"; foreach ($sites as $site => $data) echo "\t\n"; echo "\n"; echo "\n"; echo "\n
 Login* 
 Password* 

Upload to these hosts*

($data['size'] * 1048576)) ? " title='This file is too heavy for the max size allowed for this hoster.'" : (!empty($DontUlTo[$site]) ? " title='Unchecked by default for \$DontUlTo setting.'" : " checked='checked'")) . " /> ".htmlentities($site)."  ({$data['size']} MB)

*You can set it as default in " . basename(__FILE__) . "
\n"; echo "\n"; //Resize upload window && Form Check } else { $login = $not_done = false; // Login echo "\n
\n
Login to $domain
\n"; $cookie = array('user_lang' => 'en'); if (!empty($_REQUEST['up_login']) && !empty($_REQUEST['up_pass'])) { $post = array('username' => urlencode($_REQUEST['up_login']), 'password' => urlencode($_REQUEST['up_pass'])); $page = geturl($domain, 80, '/api/login', $referer, 0, $post, 0, $_GET['proxy'], $pauth);is_page($page); $json = Get_Reply($page); if (empty($json['user'])) { if (empty($json['error']) || strtolower($json['error']) == 'success') html_error('Login error: UserID value not found.'); html_error('Login error: ' . htmlentities($json['error']) . '.'); } $user = $json['user']; $login = true; } else echo "
Login not found or empty, using non member upload.
\n"; // Retrive upload ID echo "\n
Retrive upload ID
\n"; $page = geturl($domain, 80, '/api/get-fastest-server', $referer, 0, 0, 0, $_GET['proxy'], $pauth);is_page($page); $json = Get_Reply($page); if (empty($json['server'])) { if (empty($json['error']) || strtolower($json['error']) == 'success') html_error('Cannot get upload url.'); html_error('Cannot get upload url: ' . htmlentities($json['error']) . '.'); } $post = array(); if ($login) $post['user'] = $user; $i = 1; foreach (array_keys($sites) as $site) if ((!empty($_POST['UpT8']) && !empty($_POST['UpT8'][$site])) || (empty($_POST['UpT8']) && empty($DontUlTo[$site]))) $post['host' . $i++] = $site; $up_url = $json['server']; // Uploading echo "\n"; $url = parse_url($up_url); $upfiles = upfile($url['host'], defport($url), $url['path'].(!empty($url['query']) ? '?'.$url['query'] : ''), $referer, 0, $post, $lfile, $lname, 'files[]', '', $_GET['proxy'], $pauth, 0, $url['scheme']); // Upload Finished echo "\n"; is_page($upfiles); $json = Get_Reply($upfiles); if (empty($json['url'])) { if (empty($json['error']) || strtolower($json['error']) == 'success') html_error('Upload error.'); html_error('Upload error: ' . htmlentities($json['error']) . '.'); } $download_link = $json['url']; } function Get_Reply($page) { if (!function_exists('json_decode')) html_error('Error: Please enable JSON in php.'); $body = substr($page, strpos($page, "\r\n\r\n") + 4); if (empty($body)) html_error('Error reading json (Empty page).'); $body = substr($body, strpos($body, '{'));$body = substr($body, 0, strrpos($body, '}') + 1); $json = json_decode($body, true); if (empty($json)) html_error('Error reading json.'); return $json; } //[25-1-2013] Written by Th3-822. //[14-12-2015] Fixed. - Th3-822 //[19-7-2016] Added referer to requests to fix small bug. - Th3-822 ?>