function get_directinstaller_link($link) { global $API; if (preg_match('#mega\\.co\\.nz#si', $link)) { preg_match('/#(.*)/', $link, $matches); $data['hash'] = $matches[1]; $data['time'] = $API->CONFIG['TIME']; if (!$data['hash']) { return false; } $dt = get_download_ticket($data); $link = mega_get_proxy_link($dt); } elseif (preg_match('#joycloud\\.me#si', $link)) { //$link = preg_replace('/([^dl2\.]|dl1\.)thefilebay/', "\1thefilebay", $link); // dirty f*****g fix //$link = str_replace('http://', 'https://', $link); //$data['ip'] = $API->getip(); $data['time'] = $API->CONFIG['TIME']; $dt = get_download_ticket($data, 'jfsl2ygf978ga'); $link = $link . (preg_match('#\\?#si', $link) ? '&' : '?') . "aadt=" . urlencode($dt); } elseif (preg_match('#thefilebay\\.(com|net)#si', $link)) { //$link = preg_replace('/([^dl2\.]|dl1\.)thefilebay/', "\1thefilebay", $link); // dirty f*****g fix $link = str_replace('http://', 'https://', $link); //$data['ip'] = $API->getip(); $data['time'] = $API->CONFIG['TIME']; $dt = get_download_ticket($data, 'filebay_341h13ldd'); $link = $link . (preg_match('#\\?#si', $link) ? '&' : '?') . "provider=rmuss&aadt=" . urlencode($dt); } elseif (preg_match("#(ul\\.to|uploaded\\.net|sendspace\\.com|mediafire\\.com|thefilebay|datafilehost\\.com|oboom\\.com|filepup\\.net)#si", $link)) { $data['link'] = $link; $data['time'] = $API->CONFIG['TIME']; $dt = get_download_ticket($data); $link = debrid_get_proxy_link($dt); } else { //$data['ip'] = $API->getip(); $data['time'] = $API->CONFIG['TIME']; $dt = get_download_ticket($data); $link = $link . (preg_match('#\\?#si', $link) ? '&' : '?') . "provider=rmuss&dt=" . urlencode($dt); } return $link; }
<?php require_once 'init.php'; $API->TPL->assign('pagetitle', 'API'); $API->TPL->assign('footername', $API->LANG->_('Application Interfaces')); $action = $API->getval('action'); if ($action == 'di_test') { if ($_SERVER['REQUEST_METHOD'] == 'POST') { $link = htmlspecialchars($API->getval('link')); $key = substr($API->getval('key'), 0, 24); if (!$key || !$link) { $API->error('Data is missing'); } $data['time'] = $API->CONFIG['TIME']; $dt = get_download_ticket($data, $key); if (strpos($link, '?')) { $link = $link . "&dt=" . urlencode($dt); } else { $link = $link . "?dt=" . urlencode($dt); } $API->message("DI link is: <input type=\"text\" value=\"{$link}\"><br/>Try to download file from this link directly without any waits."); } $API->message('<form method="POST">Test your DI integration:<br/><input name="link" placeholder="Link to file"/><input name="key" placeholder="Encryption key" maxlength="24"/><br/><input type="submit" value="Generate link"/></form>'); } $API->TPL->display('apis.tpl');