<?php

error_reporting(E_ERROR);
include('../common.php');
include('../sql.php');
$cache_ret = $AM_CACHE->am_get();
if (!$cache_ret){

//热门词
$query = hotsearch_list();
$listmov = $_TD->FM($query);
$listmovkey  = array_rand($listmov,10);

$arr = array();
for ($i=0; $i<10; $i++){
	$arr[$i] = $listmov[$listmovkey[$i]]['vod_name'];
}

if(is_array($listmov))
{
	$arrjson = array(
		'hotsearchlist' => $arr
	);

	$str = myjsoncode($arrjson);
	
}
$AM_CACHE->am_set($str);
}else{
	$str = $cache_ret;
}

$callback = $_REQUEST['callback'];
if ($callback=="")
	echo $str;
else
	echo $callback."(".$str.")";


							
                        
?>