forked from giaythuytinh176/vinaget-script
-
Notifications
You must be signed in to change notification settings - Fork 4
/
add.php
69 lines (67 loc) · 2.43 KB
/
add.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?php
error_reporting (E_ALL);
define('vinaget', 'yes');
include("class.php");
function check_account($host,$account){
global $obj;
if(empty($obj->acc[$host]['accounts'])) return false;
foreach ($obj->acc[$host]['accounts'] as $value) if ($account == $value) return true;
return false;
}
if (!empty($_POST["accounts"])) {
$obj = new stream_get();
$type = $_POST['type'];
$_POST["accounts"] = str_replace(" ","",$_POST["accounts"]);
$account = trim($_POST['accounts']);
$donate = false;
if(check_account($type,$account)) die("false duplicate");
require_once ('hosts/' . $obj->list_host[$type]['file']);
$download = new $obj->list_host[$type]['class']($obj, $type);
if($download->lib->acc[$download->site]['proxy'] != "") $download->lib->proxy = $download->lib->acc[$download->site]['proxy'];
if(method_exists($download, "CheckAcc")) {
if (strpos($account, ":")) {
list($user, $pass) = explode(':',$account);
$cookie = $download->Login($user, $pass);
}
else $cookie = $account;
$status = $download->CheckAcc($cookie);
if($status[0]) {
echo "true";
$update = true;
if(empty($obj->acc[$type])){
$obj->acc[$type]['max_size'] = $obj->max_size_default;
$obj->acc[$type]['proxy'] = "";
$obj->acc[$type]['direct'] = false;
}
$obj->acc[$type]['accounts'][] = $account;
$download->save($cookie);
}
else {
echo "false {$status[1]}";
$update = false;
}
}
else {
echo "false plugin fail";
$update = false;
}
################################## save account #############################################################################
if($update == true && is_array($obj->acc) && count($obj->acc) > 0){
$obj->save_json($obj->fileaccount, $obj->acc);
}
################################## savve account #############################################################################
}
/*
* Home page: http://vinaget.us
* Blog: http://blog.vinaget.us
* Script Name: Vinaget
* Version: 2.6.3
* 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] ::..
*/
?>