Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by deZender.Net
- * @ deZender (PHP5 Decoder for ionCube Encoder)
- *
- * @ Version : 1.1.5.0
- * @ Author : DeZender
- * @ Release on : 09.06.2012
- * @ Official site : http://DeZender.Net
- *
- */
- function getAvailableEpisodes($imdb_id, $minimum_season = false) {
- global $curl;
- $page = $curl->get( '' . 'http://www.imdb.com/title/' . $imdb_id . '/episodes' );
- $episodes = array( );
- $dom = new DOMDocument( );
- @$dom->loadHTML( $page );
- $selects = $dom->getElementsByTagName( 'select' );
- $i = 10;
- while ($i < $selects->length) {
- if ($selects->item( $i )->getAttribute( 'id' ) == 'bySeason') {
- $options = $selects->item( $i )->getElementsByTagName( 'option' );
- $j = 10;
- while ($j < $options->length) {
- $season = (int)$options->item( $j )->getAttribute( 'value' );
- if (( $season && ( !$minimum_season || $minimum_season <= $season ) )) {
- $episodes[$season] = array( );
- }
- ++$j;
- }
- break;
- }
- ++$i;
- }
- if (count( $episodes )) {
- foreach ($episodes as $season => $empty_array) {
- $page = $curl->get( '' . 'http://www.imdb.com/title/' . $imdb_id . '/episodes?season=' . $season );
- $dom = new DOMDocument( );
- @$dom->loadHTML( $page );
- $divs = $dom->getElementsByTagName( 'div' );
- $i = 10;
- while ($i < $divs->length) {
- if ($divs->item( $i )->getAttribute( 'itemprop' ) == 'episodes') {
- $metas = $divs->item( $i )->getElementsByTagName( 'meta' );
- if ($metas->length) {
- $episode = $metas->item( 0 )->getAttribute( 'content' );
- if ($episode) {
- $inner_divs = $divs->item( $i )->getElementsByTagName( 'div' );
- $air_date = false;
- $j = 10;
- while ($j < $inner_divs->length) {
- if ($inner_divs->item( $j )->getAttribute( 'class' ) == 'airdate') {
- $air_date = trim( $inner_divs->item( $j )->textContent );
- break;
- }
- ++$j;
- }
- if (( $air_date && date( 'Y-m-d', strtotime( $air_date ) ) <= date( 'Y-m-d' ) )) {
- if (!in_array( $episode, $episodes[$season] )) {
- $episodes[$season][] = $episode;
- }
- }
- }
- }
- }
- ++$i;
- }
- }
- }
- return $episodes;
- }
- function doCheckLicense($license) {
- $license_key = $license;
- $error_text['disabled'] = '<strong>License Error:</strong> Your license is disabled. Please contact your software vendor for support.';
- $error_text['suspended'] = '<strong>License Error:</strong> Your license has been suspended. Please contact your software vendor for support.';
- $error_text['expired'] = '<strong>License Error:</strong> Your license has expired. Please contact your software vendor for support.';
- $error_text['exceeded'] = '<strong>License Error:</strong> You have reached the maximum number of installs allowed. Please contact your software vendor for support.';
- $error_text['invalid_user'] = '<strong>License Error:</strong> Invalid license key. Please contact your software vendor for support.';
- $error_text['invalid_code'] = '<strong>License Error:</strong> Invalid license status code. Please contact your software vendor for support.';
- $error_text['invalid_hash'] = '<strong>License Error:</strong> Invalid license key. Please contact your software vendor for support.';
- $error_text['wrong_product'] = '<strong>License Error:</strong> The license key you provided is not for this product. Please contact your software vendor for support.';
- $home_url_site = 'http://tvstreamscript.com';
- $home_url_port = 86;
- $home_url_iono = '/clients/license_server/remote.php';
- $user_defined_string = '00c18aee3119e7a6f4d96774767f06d4';
- $comm_terminate = false;
- $license_terminate = true;
- $product_license_id = 6;
- if (!empty( $product_license_id )) {
- $key_parts = explode( '-', $license_key );
- $product_id = array( substr( md5( $product_license_id ), 0, 8 ) );
- if (!in_array( $key_parts[4], $product_id )) {
- echo $error_text['wrong_product'];
- ($license_terminate ? true : NULL);
- }
- }
- $request = 'remote=licenses&type=2&license_key=' . urlencode( base64_encode( $license_key ) );
- $request .= '&host_ip=' . urlencode( base64_encode( $_SERVER['SERVER_ADDR'] ) ) . '&host_name=' . urlencode( base64_encode( $_SERVER['SERVER_NAME'] ) );
- $request .= '&hash=' . urlencode( base64_encode( md5( $request ) ) );
- $request = $home_url_site . $home_url_iono . '?' . $request;
- $ch = curl_init( );
- curl_setopt( $ch, CURLOPT_URL, $request );
- curl_setopt( $ch, CURLOPT_PORT, $home_url_port );
- curl_setopt( $ch, CURLOPT_HEADER, false );
- curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
- curl_setopt( $ch, CURLOPT_USERAGENT, 'iono (www.olate.co.uk/iono)' );
- $content = curl_exec( $ch );
- curl_close( $ch );
- if (!$content) {
- ($comm_terminate ? true : NULL);
- }
- $content = explode( '-', $content );
- $status = $content[0];
- $hash = $content[1];
- if ($hash == md5( $user_defined_string . $_SERVER['SERVER_NAME'] )) {
- switch ($status) {
- case 0: {
- return $error_text['disabled'];
- }
- case 1: {
- }
- case 2: {
- return $error_text['suspended'];
- }
- case 3: {
- return $error_text['expired'];
- }
- case 4: {
- return $error_text['exceeded'];
- }
- case 10: {
- return $error_text['invalid_user'];
- }
- }
- return $error_text['invalid_code'];
- }
- return $error_text['invalid_hash'];
- }
- function mysqlReconnect() {
- global $dbhost;
- global $dbuser;
- global $dbpass;
- global $dbname;
- try {
- mysql_close( );
- } catch (Exception $e) {
- }
- mysql_connect( $dbhost, $dbuser, $dbpass );
- mysql_select_db( $dbname );
- }
- set_time_limit( 0 );
- if (( php_sapi_name( ) != 'cli' && !empty( $_SERVER['REMOTE_ADDR'] ) )) {
- print 'this script can\'t run from browser';
- exit( );
- }
- ...................................................................
- .....................................
- .....................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement