<?php define("DEBUG", 0); if(DEBUG) { error_reporting(E_ALL); ini_set("log_errors", 1); ini_set("display_errors", "On"); } else { error_reporting(0); ini_set("log_errors", 0); ini_set("display_errors", "Off"); } set_time_limit(0); ignore_user_abort(TRUE); @ob_start(); @session_start(); @header("Content-Type: text/html; charset=utf-8"); $users = Array( Array( 'username' => 'admin', 'password' => '123456x' ), Array( 'username' => 'admin2', 'password' => '123456x' ) ); if(isset($_POST['submit'])) { if(isset($_POST['username']) && isset($_POST['username'])) { if(!empty($_POST['username']) && !empty($_POST['password'])) { if(count($users) == 0) { $error = Array( 'type' => 'info', 'message' => 'Yönetici belirlenmemiş' ); } else { $login = false; $username = null; foreach($users as $user) { if($user['username'] == $_POST['username'] && $user['password'] == $_POST['password']) { $login = true; $username = $user['username']; break; } else if($user['username'] == $_POST['username'] && $user['password'] != $_POST['password']) { $error = Array( 'type' => 'danger', 'message' => 'Kullanıcı bilgileri hatalı' ); } } if($login == true) { $_SESSION['LOGIN'] = true; $_SESSION['USERNAME'] = $username; $_SESSION['HASH'] = md5($username . time()); } else if(!isset($error)) { $error = Array( 'type' => 'danger', 'message' => 'Kullanıcı bulunamadı' ); } } } else { $error = Array( 'type' => 'danger', 'message' => 'Kullanıcı bilgileri eksik' ); } } } if(isset($_REQUEST['logout'])) { if(isset($_SESSION['LOGIN'])) { if($_SESSION['HASH'] == $_REQUEST['logout']) { unset($_SESSION['LOGIN'], $_SESSION['USERNAME'], $_SESSION['HASH']); @session_destroy(); $error = Array( 'type' => 'info', 'message' => 'Başarı ile çıkış yapıldı' ); } } else { $error = Array( 'type' => 'warning', 'message' => 'Zaten çıkış yapmışsınız' ); } } class cURL { public $headers; public $options; public $lastInfo; public function get_content($url, $request = null, $params = null) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HTTPHEADER, $this->headers); if(!is_null($request) && !is_null($params)) { curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $request); // curl_setopt($ch, CURLOPT_POST, TRUE); curl_setopt($ch, CURLOPT_POSTFIELDS, $params); } @curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 3); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT_MS, 3000); curl_setopt($ch, CURLOPT_TIMEOUT, 3); curl_setopt($ch, CURLOPT_TIMEOUT_MS, 3000); if(is_array($this->options)) { curl_setopt_array($ch, $this->options); } $result = curl_exec($ch); $this->lastInfo = curl_getinfo($ch); curl_close($ch); return $result; } } function parse($content, $start, $end) { $output = explode($start, $content); $output = explode($end, $output[1]); return $output[0]; } function mtrim($string) { return str_replace(array("r","n","t"," ", " "), NULL, $string); } function alert($type,$message,$dismiss = false) { ?> > <?php if($dismiss) { ?> × <?php } ?> Uyarı! <?php echo $message; ?> <?php } function findIframe($content, $index=0) { $result = null; @error_reporting(0); @ini_set("log_errors", 0); @ini_set("display_errors", "Off"); $doc = new DOMDocument(); if($doc->loadHTML($content)) { $i = 0; foreach($doc->getElementsByTagName('iframe') as $obj) { if($index == $i) { $result = $obj->getAttribute('src'); $result = (substr($result, 0, 2) == "//" ? "https:" . $result : $result); break; } $i++; } } error_reporting(E_ALL); ini_set("log_errors", 1); ini_set("display_errors", "On"); return $result; } function generateCode($parts) { $codes = array(); foreach($parts as $part) { $codes[] = "<!--baslik:{$part['title']}-->rn<iframe width='640' height='360' src='{$part['url']}' frameborder='0' marginwidth='0' marginheight='0' scrolling='no' allowfullscreen></iframe>"; } return implode("rnrn<!--nextpage-->", $codes); } function iconv2($tmp) { return iconv("UTF-8", "ISO-8859-1", $tmp); } function generateParts(&$parts,$index=0) { global $furl; $rand = rand(999,99999); ?>
'.print_r($parts,true).''; // echo "<textarea>$content</textarea>"; break; case "filmizle.movie": $type = 0; if(substr_count($content, '
')) {
$type = 2;
preg_match_all('@ Türkçe Dublaj(.*?)Altyazılı(.*?)
"; @ob_flush(); flush();
}
}
$i++;
}
if($type == 2) {
$i = 0;
foreach($parts2 as $part) {
$content = mtrim($c->get_content($part['url']));
$iframeUrl = findIframe($content);
if(!empty($iframeUrl)) {
$parts2[$i]['url'] = $iframeUrl;
} else {
// echo "{$part['url']} iframesi verisi boş
"; @ob_flush(); flush();
}
$i++;
}
echo "Türkçe Dublaj
"; @ob_flush(); flush();
}
generateParts($parts,0);
echo 'Altyazılı
"; @ob_flush(); flush();
generateParts($parts2,0);
echo '