vdhdevil, on 15 March 2011 - 05:06 AM, said:
hm, i get a crazy mistake on free download, problem is solved.
Premium is fixed also due to they has just changed the format direct link
Support on enable and disable direct link also
Have fun

mate, for premium now work fine (support direct download enabled/disabled), but for free, sometimes this error still cames (test in ur private server, I test in other server work fine).
I have ask th3-882, I quote from him :
Quote
I also put something to try to make the browser reload the image always
this is his code for free plugin :
<?php
if (!defined('RAPIDLEECH')) {
require_once ("index.html");
exit ();
}
class uploaded_to extends DownloadClass {
public function Download($link) {
if ($_POST['step'] == "1") {
$this->DownloadFree($link);
} else {
$this->PrepareFree($link);
}
}
private function PrepareFree($link) {
global $Referer;
$page = $this->GetPage($link);
is_present($page, "uploaded.to/404", "File not found");
if (!preg_match('/Current waiting period: <span>(\d+)<\/span>/i', $page, $cD)) {
html_error("Error: Timer not found.");
}
insert_timer($cD[1], "Please wait.", "", true);
if (!preg_match('/Recaptcha\.create\("([^"]+)/i', $this->GetPage('http://uploaded.to/js/download.js'), $rc)) {
html_error("Error: CAPTCHA not found.");
}
$linkcaptcha = "http://www.google.com/recaptcha/api/challenge?k=" . $rc[1];
$page = $this->GetPage($linkcaptcha, 0, 0, $link);
$ch = cut_str($page, "challenge : '", "'");
$data = array();
$data['step'] = "1";
$data['link'] = urlencode($link);
$data['referer'] = urlencode($Referer);
$data['recaptcha_challenge_field'] = $ch;
//Download captcha img.
$page = $this->GetPage("http://www.google.com/recaptcha/api/image?c=" . $ch, 0, 0, $link);
$capt_img = substr($page, strpos($page, "\r\n\r\n") + 4);
$imgfile = DOWNLOAD_DIR . "uploaded_to_captcha.jpg";
if (file_exists($imgfile)) {
unlink($imgfile);
}
if (! write_file($imgfile, $capt_img)) {
html_error("Error: Can't save CAPTCHA image.");
}
$this->EnterCaptcha($imgfile . '?' . time(), $data, 20);
exit;
}
private function DownloadFree($link) {
$post = array();
$post['recaptcha_challenge_field'] = $_POST["recaptcha_challenge_field"];
$post['recaptcha_response_field'] = $_POST["captcha"];
$page = $this->GetPage(str_replace('/file/', '/io/ticket/captcha/', $link), 0, $post, $link);
if (preg_match('/\{err:"([^"]+)"\}/i', $page, $err)) {
$errors = array('captcha' => 'Entered CAPTCHA was incorrect',
'limit-host' => '"For technical reasons, a download is currently not possible". Try again',
'limit-dl' => "You've reached your download limit (a file every 60 minutes). Try again later",
'limit-parallel' => "You're already downloading a file",
'limit-size' => 'This file is too big (> 1 GB) to download it for free');
foreach ($errors as $n => $v) {
is_present($err[1], $n, "Error: $v.");
}
html_error("Error validating CAPTCHA.");
}
if (!preg_match("@url:'(http://.+/dl/\?id=\w+)@i", $page, $dl)) {
html_error("Error: Download link not found.");
}
$this->RedirectDownload($dl[1], 'ul.to_dl');
exit;
}
}
//[14-Mar-2011] by Th3-822 - [Free DL] Plugin rewritten for new layout.
?>
now, the error message getting captcha doesnt appear again.
PS : mind if u combined with ur plugin? thx in advance for ur help!
Edited by __S_e7e_N.7x__, 16 March 2011 - 06:27 AM.