} else { require_once "../../includes/decaptcher.poster.php"; define('HOST', $decaptcher->url); // HOST define('PORT', 80); // PORT 80 or 443 define('USERNAME', $decaptcher->username); // YOUR LOGIN define('PASSWORD', $decaptcher->password); // YOUR PASSWORD } if (isset($id) && $id && is_numeric($id)) { $show = $shows->getEpisodeById($id, "en"); if (count($show)) { $sr = $settings->getSetting("sidereel"); if ($sidereel->checkLogged($sr->username) || $sidereel->login($sr->username, $sr->password)) { // getting the captcha $data = $sidereel->getCaptcha($show['showtitle'], $show['season'], $show['episode']); if ($data) { $text = ''; if (isset($decaptcher->port) && $decaptcher->port) { $pict = file_get_contents("{$basepath}/cachefiles/" . $data['image'] . ".jpg"); $res = $ccp->picture2($pict, $pict_to, $pict_type, $text, $major_id, $minor_id); } else { $res = poster_curl(HOST, PORT, USERNAME, PASSWORD, "{$basepath}/cachefiles/" . $data['image'] . ".jpg", NULL, ptUNSPECIFIED); if (!is_numeric($res)) { $text = $res; } } switch ($res) { // most common return codes
} } if (isset($save_sidereel) && $save_sidereel && isset($_POST['sidereel'])) { if (!defined("DEMO") || !DEMO) { $sidereel_errors = array(); $sidereel = $_POST['sidereel']; if (!isset($sidereel['username']) || !$sidereel['username']) { $sidereel_errors[1] = "Please enter your sidereel username"; } if (!isset($sidereel['password']) || !$sidereel['password']) { $sidereel_errors[1] = "Please enter your sidereel password"; } if (!count($sidereel_errors)) { require_once "../includes/sidereel.class.php"; $sr = new Sidereel(); if ($sr->checkLogged($sidereel['username']) || $sr->login($sidereel['username'], $sidereel['password'])) { $settings->addSetting("sidereel", json_encode($sidereel)); $sidereel_success = true; } else { $sidereel_errors[1] = "Can't login with these details"; } } } } else { $sidereel = $settings->getSetting("sidereel", true); if (defined("DEMO") && DEMO && $sidereel && !empty($sidereel)) { foreach ($sidereel as $key => $val) { $sidereel[$key] = "HIDDEN IN DEMO"; } } }