array(array('host' => '10.169.101.47', 'port' => 11211)), 'prefix' => 'zjcj', 'expire' => 900); $cache = new CMemcache($memcache); $ckey = __FUNCTION__ . $type . $start . $record; $rtn = $cache->get($ckey); if (!$rtn) { $text = '/http\:\/\/video\.cnfol\.com\/.*?\/(\d+)\/(\d+)\.shtml/'; $url = "http://shell.cnfol.com/3gcnfol/dynamic.php?id=" . $type . "&start=" . $start . "&record=" . $record . "&order=" . $order . "&apikey=" . $appkey; $rtn = getVData($url); if (is_array($rtn) && !empty($rtn)) { foreach ($rtn as $key => $val) { preg_match($text, $val["url"], $att); $rtn[$key]["year"] = substr($att[1], 0, 4) ; $rtn[$key]["id"] = $att[2]; } $cache->set($ckey, $rtn); } else { $rtn = array("errorcode" => 10010, "errormsg" => $rtn); } } } else { $rtn = array("errorcode" => 10020, "errormsg" => "加密出错"); } } else { $rtn = array("errorcode" => 10030, "errormsg" => "classid和appkey必须传"); } }else if($type=="480"){ $model = new usermodel(); $rtn=$model->selfamouslist($type, $record); if(!$rtn){$rtn=array();} }else { $rtn = array("errorcode" => 10040, "errormsg" => "classid参数不符合"); } header("Content-Type:application/json;charset=utf-8"); echo json_encode($rtn); exit();