/** * Get movie host mirrors. */ function fetchMovie($item, $title) { $template = new KinotoTemplate(); $template->setMovieTitle($title); //Parse movie page if (!strpos($item, "//kino.to")) { $item = "http://kino.to" . $item; } $content = file_get_contents($item, false, getExplorerContext(getSiteHash())); //Get image preg_match("/<div class=\"Grahpics\">(.*)src=\"(.*)\"/U", $content, $image); $image = $image[2]; $template->setImage($image); //Get description $description = strstr($content, "Descriptore"); $description = strstr($description, ">"); $description = substr($description, 1, strpos($description, "<") - 1); $template->setDescription(html_entity_decode($description, ENT_QUOTES)); //Get Mirror list $mirrorList = strstr($content, "HosterList"); $mirrorList = substr($mirrorList, 0, strpos($mirrorList, "</ul>")); preg_match_all("|rel\\=\"(.*)\"(.*)<div class\\=\"Named\">(.*)<\\/div>|U", $mirrorList, $mirrors, PREG_SET_ORDER); foreach ($mirrors as $mirror) { if ($mirror[3] == "Megavideo.com" || $mirror[3] == "Bitload.com (Flash)" || $mirror[3] == "Bitload.com (DivX)" || $mirror[3] == "Various (Flash)" || $mirror[3] == "Archiv.to (DivX)" || $mirror[3] == "Archiv.to (Flash)") { $template->addItem($mirror[3], "", SCRAPER_URL . "moviesPreLink.php?params=" . base64_encode($mirror[1]) . URL_AMP . "host=" . base64_encode($mirror[3]) . URL_AMP . "title=" . base64_encode($title) . URL_AMP . "image=" . base64_encode($image) . URL_AMP . "PHPSESID=" . session_id(), ""); } } $template->generateView(KinotoTemplate::VIEW_MOVIE_DETAIL); }
* GNU/GPL Licensed * ------------------------*/ include_once '../../config/config.php'; include_once 'KinotoTemplate.php'; include_once "../../util/VideoUtil.php"; include_once "../../util/RssScriptUtil.php"; include_once '../../action/Action.php'; include_once '../../action/rss/SaveBookmarkAction.php'; include_once '../../action/rss/DeleteBookmarkAction.php'; define("SCRAPER_URL", SERVER_HOST_AND_PATH . "php/scraper/kinoto/"); if (isset($_GET["params"])) { $title = base64_decode($_GET["title"]); $params = base64_decode($_GET["params"]); $host = base64_decode($_GET["host"]); $image = base64_decode($_GET["image"]); $template = new KinotoTemplate(); $template->setMovieTitle($title); $template->setImage($image); $url = "http://kino.to/aGET/Mirror/" . str_replace("&", "&", $params); switch ($host) { case "Megavideo.com": addMegavideoLink($template, $url); break; case "Bitload.com (Flash)": addBitloadLink($template, $url); break; case "Bitload.com (DivX)": addBitloadDivxLink($template, $url); break; case "Various (Flash)": addNovamovLink($template, $url);