├── example.php ├── README.md └── degoo.class.php /example.php: -------------------------------------------------------------------------------- 1 | register(9)); 7 | } catch (Exception $ex) { 8 | var_dump($ex->getMessage()); 9 | } 10 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # DEPRECATED! 2 | 3 | # degoo 4 | 600GB free backup space. 5 | 6 | [degoo.com](https://degoo.com/) is a service offering 100GB backup space for free and option to add 500GB more inviting friedns to use it. 7 | Using this script you will be able to add as many additional space as you want (up to 500GB). 8 | 9 | ##It is very easy to use.## 10 | ``` 11 | require_once 'degoo.class.php'; 12 | try{ 13 | $degoo = new Degoo('email@email.com', 'XXXXXXX' ); 14 | $result = $degoo->register('max'); 15 | print_r($result); 16 | } catch (Exception $ex) { 17 | var_dump($ex->getMessage()); 18 | } 19 | ``` 20 | Where: 21 | 22 | **email@email.com** is some valid email address used for base for the registrations. 23 | 24 | **XXXXXXX** is your invitor id. This is very import to be corect. 25 | You can get this id from https://degoo.com/me/invitemore . Last characters under your Degoo link is the id. 26 | 27 | ###Possible values for register function### 28 | Parameter for ```register``` could be int number of GB you would like to add or 'max', which will add 500GB to your account. 29 | ``` 30 | $result = $degoo->register('max'); 31 | ``` 32 | OR 33 | ``` 34 | $result = $degoo->register(9); 35 | ``` 36 | -------------------------------------------------------------------------------- /degoo.class.php: -------------------------------------------------------------------------------- 1 | email = $email; 26 | $this->inviteId = $inviteId; 27 | $this->password = $email; 28 | } 29 | 30 | /** 31 | * Set password for generated accounts. 32 | * Else, password will be the email. 33 | * @param type $password Password to be used 34 | */ 35 | public function setPassword($password = null) 36 | { 37 | if ($password) 38 | { 39 | $this->password = $password; 40 | } 41 | } 42 | 43 | /** 44 | * Register one email. 45 | * @param type $email - Valid Email address 46 | * @return boolean 47 | * @throws Exception 48 | */ 49 | public function registerEmail($email = null) 50 | { 51 | 52 | if (!$email or 53 | ! filter_var($email, 54 | FILTER_VALIDATE_EMAIL)) 55 | { 56 | throw new Exception('No Email'); 57 | } 58 | 59 | $res = $this->curlURL(array( 60 | 'Email' => $email, 61 | 'Password' => $this->password, 62 | 'Invite' => $this->inviteId, 63 | 'type' => 'signup', 64 | 'RedirectUrl' => '', 65 | )); 66 | if ($res) 67 | { 68 | $page = new DOMDocument(); 69 | @$page->loadHTML($res); 70 | $page->saveHTML(); 71 | $xpath = new DOMXPath($page); 72 | $title = $xpath->query("//title/text()") 73 | ->item(0) 74 | ->nodeValue; 75 | return (trim($title) 76 | == 'Download') ? true : false; 77 | } 78 | return false; 79 | } 80 | 81 | /** 82 | * Register many random generated email to achive desired GB. 83 | * @param int $limit Limit how many GB to add to your account 84 | * @return array Returns array of registered emails and statuses 85 | * @throws Exception 86 | */ 87 | public function register($limit = 'max') 88 | { 89 | if ($limit 90 | == 'max') 91 | { 92 | $limit = 167; 93 | } 94 | if ($limit 95 | % 3 96 | != 0) 97 | { 98 | $limit += 3 99 | - $limit 100 | % 3; 101 | } 102 | $limit = $limit 103 | / 3; 104 | 105 | if ($limit 106 | < 1 or $limit 107 | > 167) 108 | throw new Exception('Limit must be greater then 3, less then 502 or max'); 109 | $return = array(); 110 | for ($i = 0; $i 111 | < $limit; $i++) 112 | { 113 | $currentEmail = explode('@', 114 | $this->email); 115 | $modifier = time(); 116 | $currentEmail = $currentEmail[0] . "+$modifier@" . $currentEmail[1]; 117 | $return[$currentEmail] = ($this->registerEmail($currentEmail)) ? 'Success' : 'Failed'; 118 | } 119 | return $return; 120 | } 121 | 122 | private function curlURL( 123 | array $post = null) 124 | { 125 | $curl_connection = curl_init($this->url); 126 | 127 | if ($post and is_array($post)) 128 | { 129 | $fields_string = ''; 130 | 131 | foreach ($post as $key => $value) 132 | { 133 | $fields_string .= urlencode($key) . '=' . urlencode($value) . '&'; 134 | } 135 | 136 | rtrim($fields_string, 137 | '&'); 138 | 139 | curl_setopt($curl_connection, 140 | CURLOPT_POST, 141 | count($post)); 142 | curl_setopt($curl_connection, 143 | CURLOPT_POSTFIELDS, 144 | $fields_string); 145 | } 146 | 147 | curl_setopt($curl_connection, 148 | CURLOPT_USERAGENT, 149 | "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"); 150 | curl_setopt($curl_connection, 151 | CURLOPT_RETURNTRANSFER, 152 | true); 153 | curl_setopt($curl_connection, 154 | CURLOPT_SSL_VERIFYPEER, 155 | false); 156 | curl_setopt($curl_connection, 157 | CURLOPT_FOLLOWLOCATION, 158 | 1); 159 | 160 | $result = curl_exec($curl_connection); 161 | curl_close($curl_connection); 162 | 163 | return $result; 164 | } 165 | 166 | } 167 | --------------------------------------------------------------------------------