Files
nexusphp/public/getextinfoajax.php

28 lines
842 B
PHP
Raw Permalink Normal View History

2020-12-26 01:42:23 +08:00
<?php
2021-01-13 19:32:26 +08:00
require "../include/bittorrent.php";
2022-04-04 17:26:26 +08:00
//require_once ("imdb/imdb.class.php");
2020-12-26 01:42:23 +08:00
dbconn();
//Send some headers to keep the user's browser from caching the response.
2022-04-04 17:26:26 +08:00
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT" );
header("Last-Modified: " . gmdate( "D, d M Y H:i:s" ) . "GMT" );
header("Cache-Control: no-cache, must-revalidate" );
2020-12-26 01:42:23 +08:00
header("Pragma: no-cache" );
header("Content-Type: text/xml; charset=utf-8");
$imdblink = $_GET['url'];
$mode = $_GET['type'];
$cache_stamp = $_GET['cache'];
$imdb_id = parse_imdb_id($imdblink);
2022-04-04 17:26:26 +08:00
$Cache->new_page('imdb_id_'.$imdb_id.'_'.$mode);
2020-12-26 01:42:23 +08:00
if (!$Cache->get_page()){
$infoblock = getimdb($imdb_id, $cache_stamp, $mode);
if ($infoblock){
$Cache->add_whole_row();
print($infoblock);
$Cache->end_whole_row();
$Cache->cache_page();
echo $Cache->next_row();
}
}
else echo $Cache->next_row();
?>