Advertisement
Guest User

Untitled

a guest
Mar 21st, 2013
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.02 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by deZender.Net
  5. * @ deZender (PHP5 Decoder for ionCube Encoder)
  6. *
  7. * @ Version : 1.1.5.0
  8. * @ Author : DeZender
  9. * @ Release on : 09.06.2012
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. function getAvailableEpisodes($imdb_id, $minimum_season = false) {
  15. global $curl;
  16.  
  17. $page = $curl->get( '' . 'http://www.imdb.com/title/' . $imdb_id . '/episodes' );
  18. $episodes = array( );
  19. $dom = new DOMDocument( );
  20. @$dom->loadHTML( $page );
  21. $selects = $dom->getElementsByTagName( 'select' );
  22. $i = 10;
  23.  
  24. while ($i < $selects->length) {
  25. if ($selects->item( $i )->getAttribute( 'id' ) == 'bySeason') {
  26. $options = $selects->item( $i )->getElementsByTagName( 'option' );
  27. $j = 10;
  28.  
  29. while ($j < $options->length) {
  30. $season = (int)$options->item( $j )->getAttribute( 'value' );
  31.  
  32. if (( $season && ( !$minimum_season || $minimum_season <= $season ) )) {
  33. $episodes[$season] = array( );
  34. }
  35.  
  36. ++$j;
  37. }
  38.  
  39. break;
  40. }
  41.  
  42. ++$i;
  43. }
  44.  
  45.  
  46. if (count( $episodes )) {
  47. foreach ($episodes as $season => $empty_array) {
  48. $page = $curl->get( '' . 'http://www.imdb.com/title/' . $imdb_id . '/episodes?season=' . $season );
  49. $dom = new DOMDocument( );
  50. @$dom->loadHTML( $page );
  51. $divs = $dom->getElementsByTagName( 'div' );
  52. $i = 10;
  53.  
  54. while ($i < $divs->length) {
  55. if ($divs->item( $i )->getAttribute( 'itemprop' ) == 'episodes') {
  56. $metas = $divs->item( $i )->getElementsByTagName( 'meta' );
  57.  
  58. if ($metas->length) {
  59. $episode = $metas->item( 0 )->getAttribute( 'content' );
  60.  
  61. if ($episode) {
  62. $inner_divs = $divs->item( $i )->getElementsByTagName( 'div' );
  63. $air_date = false;
  64. $j = 10;
  65.  
  66. while ($j < $inner_divs->length) {
  67. if ($inner_divs->item( $j )->getAttribute( 'class' ) == 'airdate') {
  68. $air_date = trim( $inner_divs->item( $j )->textContent );
  69. break;
  70. }
  71.  
  72. ++$j;
  73. }
  74.  
  75.  
  76. if (( $air_date && date( 'Y-m-d', strtotime( $air_date ) ) <= date( 'Y-m-d' ) )) {
  77. if (!in_array( $episode, $episodes[$season] )) {
  78. $episodes[$season][] = $episode;
  79. }
  80. }
  81. }
  82. }
  83. }
  84.  
  85. ++$i;
  86. }
  87. }
  88. }
  89.  
  90. return $episodes;
  91. }
  92.  
  93. function doCheckLicense($license) {
  94. $license_key = $license;
  95. $error_text['disabled'] = '<strong>License Error:</strong> Your license is disabled. Please contact your software vendor for support.';
  96. $error_text['suspended'] = '<strong>License Error:</strong> Your license has been suspended. Please contact your software vendor for support.';
  97. $error_text['expired'] = '<strong>License Error:</strong> Your license has expired. Please contact your software vendor for support.';
  98. $error_text['exceeded'] = '<strong>License Error:</strong> You have reached the maximum number of installs allowed. Please contact your software vendor for support.';
  99. $error_text['invalid_user'] = '<strong>License Error:</strong> Invalid license key. Please contact your software vendor for support.';
  100. $error_text['invalid_code'] = '<strong>License Error:</strong> Invalid license status code. Please contact your software vendor for support.';
  101. $error_text['invalid_hash'] = '<strong>License Error:</strong> Invalid license key. Please contact your software vendor for support.';
  102. $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.';
  103. $home_url_site = 'http://tvstreamscript.com';
  104. $home_url_port = 86;
  105. $home_url_iono = '/clients/license_server/remote.php';
  106. $user_defined_string = '00c18aee3119e7a6f4d96774767f06d4';
  107. $comm_terminate = false;
  108. $license_terminate = true;
  109. $product_license_id = 6;
  110.  
  111. if (!empty( $product_license_id )) {
  112. $key_parts = explode( '-', $license_key );
  113. $product_id = array( substr( md5( $product_license_id ), 0, 8 ) );
  114.  
  115. if (!in_array( $key_parts[4], $product_id )) {
  116. echo $error_text['wrong_product'];
  117. ($license_terminate ? true : NULL);
  118. }
  119. }
  120.  
  121. $request = 'remote=licenses&type=2&license_key=' . urlencode( base64_encode( $license_key ) );
  122. $request .= '&host_ip=' . urlencode( base64_encode( $_SERVER['SERVER_ADDR'] ) ) . '&host_name=' . urlencode( base64_encode( $_SERVER['SERVER_NAME'] ) );
  123. $request .= '&hash=' . urlencode( base64_encode( md5( $request ) ) );
  124. $request = $home_url_site . $home_url_iono . '?' . $request;
  125. $ch = curl_init( );
  126. curl_setopt( $ch, CURLOPT_URL, $request );
  127. curl_setopt( $ch, CURLOPT_PORT, $home_url_port );
  128. curl_setopt( $ch, CURLOPT_HEADER, false );
  129. curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
  130. curl_setopt( $ch, CURLOPT_USERAGENT, 'iono (www.olate.co.uk/iono)' );
  131. $content = curl_exec( $ch );
  132. curl_close( $ch );
  133.  
  134. if (!$content) {
  135. ($comm_terminate ? true : NULL);
  136. }
  137.  
  138. $content = explode( '-', $content );
  139. $status = $content[0];
  140. $hash = $content[1];
  141.  
  142. if ($hash == md5( $user_defined_string . $_SERVER['SERVER_NAME'] )) {
  143. switch ($status) {
  144. case 0: {
  145. return $error_text['disabled'];
  146. }
  147.  
  148. case 1: {
  149. }
  150.  
  151. case 2: {
  152. return $error_text['suspended'];
  153. }
  154.  
  155. case 3: {
  156. return $error_text['expired'];
  157. }
  158.  
  159. case 4: {
  160. return $error_text['exceeded'];
  161. }
  162.  
  163. case 10: {
  164. return $error_text['invalid_user'];
  165. }
  166. }
  167.  
  168. return $error_text['invalid_code'];
  169. }
  170.  
  171. return $error_text['invalid_hash'];
  172. }
  173.  
  174. function mysqlReconnect() {
  175. global $dbhost;
  176. global $dbuser;
  177. global $dbpass;
  178. global $dbname;
  179.  
  180. try {
  181. mysql_close( );
  182. } catch (Exception $e) {
  183. }
  184. mysql_connect( $dbhost, $dbuser, $dbpass );
  185. mysql_select_db( $dbname );
  186. }
  187.  
  188. set_time_limit( 0 );
  189.  
  190. if (( php_sapi_name( ) != 'cli' && !empty( $_SERVER['REMOTE_ADDR'] ) )) {
  191. print 'this script can\'t run from browser';
  192. exit( );
  193. }
  194. ...................................................................
  195. .....................................
  196. .....................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement