function UpdateTimeline() { global $settings; /** Perform a GET request and echo the response **/ $url = 'https://api.twitter.com/1.1/statuses/home_timeline.json'; $getfield = '?count=30'; $requestMethod = 'GET'; $twitter = new TwitterAPIExchange($settings); $timeline = $twitter->setGetfield($getfield)->buildOauth($url, $requestMethod)->performRequest(); //save to cache UpdateCache($timeline); //echo results; echo $timeline; }
} else { $error = '<div class="framesubtitle">Bad Request</div><div class="errordescription">服务器无法识别你的请求,请检查你是否填写了所有必须参数…</div>'; } } if ($_GET["act"] == 'play') { $title = 'AV' . $_GET["av"] . ' - 播放'; if (!empty($_GET["av"]) && !empty($_GET["player"])) { if (!empty($_GET["page"])) { $page = $_GET["page"]; } else { $page = 1; } $id = $_GET["av"] . '_' . $page; $apijson = mysql_query("SELECT * FROM CACHE_PAGE WHERE ID='{$id}'"); if (!mysql_num_rows($apijson)) { UpdateCache($_GET["av"], $page); } else { $apijson = mysql_fetch_array($apijson); $datatime = $apijson['LASTUPDATE']; $return = json_decode($apijson['DATA'], true); if (!array_key_exists("error", $return)) { $videotitle = $return['title']; if (isset($return['list'][$page - 1]['cid'])) { $cid = $return['list'][$page - 1]['cid']; $p = 0; $pagelist = ''; while (isset($return['list'][$p]['cid'])) { $pagelist = $pagelist . '<a href="/api/do.php?act=play&av=' . $_GET["av"] . '&page=' . $return['list'][$p]['page'] . '&player=' . $_GET["player"] . '"><div class="listbox">[P' . ($p + 1) . '] ' . $return['list'][$p]['part'] . '</div></a>'; $p++; } if ($_GET["player"] == 'mukio') {
$find = "/\\[module\\]" . preg_quote($key) . "\\[\\/module\\]/is"; $jstemplate = !empty($_GET['jstemplate']) ? get_magic_quotes_gpc() ? stripslashes($_GET['jstemplate']) : $_GET['jstemplate'] : ''; $jstemplate = preg_replace("/\r\n|\n|\r/", '\\n', $jstemplate); $jstemplatebody = ''; if (preg_match("/\\[node\\](.+?)\\[\\/node\\]/is", $jstemplate, $node)) { $jstemplatebody = $jstemplate; $jstemplate = $node[1]; } $writedata = preg_replace($find, jsmodule($function), $writedata); } } $nocache = $customnocache; $datalist = $writedata = procdata('document.write("' . $writedata . '");'); if (!$nocache) { $writedata = "\$datalist = '" . addcslashes($writedata, '\\\'') . "';"; UpdateCache($customcachefile, $writedata); } } } echo $datalist; function jsmodule($function) { extract($GLOBALS, EXTR_SKIP); $fids = isset($_GET['fids']) ? $_GET['fids'] : NULL; $startrow = isset($_GET['startrow']) ? intval($_GET['startrow']) : 0; $items = isset($_GET['items']) ? intval($_GET['items']) : 10; $digest = isset($_GET['digest']) ? intval($_GET['digest']) : 0; $stick = isset($_GET['stick']) ? intval($_GET['stick']) : 0; $newwindow = isset($_GET['newwindow']) ? $_GET['newwindow'] : 1; $LinkTarget = $newwindow == 1 ? " target='_blank'" : ($newwindow == 2 ? " target='main'" : NULL); if ($function == 'threads') {