代码拉取完成,页面将自动刷新
<?php
require "include/bittorrent.php";
dbconn();
function data_url($file, $mime) {
$contents = file_get_contents($file);
$base64 = base64_encode($contents);
return ('data:' . $mime . ';base64,' . $base64);
}
$url = get_protocol_prefix() . $BASEURL;
$year = substr($datefounded, 0, 4);
$yearfounded = ($year ? $year : 2014);
$attribution = "Copyright (c) " . $SITENAME . " " . (date("Y") != $yearfounded ? $yearfounded . "-" : "") . date("Y") . ", all rights reserved";
header("Content-type: text/xml");
$Cache->new_page('opensearch_description', 86400);
if (!$Cache->get_page()) {
$Cache->add_whole_row();
print("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n");
?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:moz="http://www.mozilla.org/2006/browser/search/">
<ShortName><?= $SITENAME ?> Torrents</ShortName>
<Description>Search Torrents at <?= $SITENAME ?> - <?= htmlspecialchars($SLOGAN) ?>.</Description>
<Url type="text/html"
rel="results"
pageOffset="0"
template="<?= $url ?>/torrents.php?search={searchTerms}&page={startPage?}" />
<Url type="application/rss+xml"
rel="results"
indexOffset="0"
template="<?= $url ?>/torrentrss.php?search={searchTerms}&rows={count?}&startindex={startIndex?}" />
<Url type="application/opensearchdescription+xml"
rel="self"
template="<?= $url ?>/opensearch.php" />
<Url type="application/x-suggestions+json"
rel="suggestions"
template="<?= $url ?>/searchsuggest.php?q={searchTerms}" />
<Contact><?= $SITEEMAIL ?></Contact>
<Tags>Torrents <?= PROJECTNAME ?></Tags>
<LongName><?= $SITENAME ?> Torrents Search</LongName>
<Image height="32" width="32" type="image/x-icon"><?= data_url('favicon.ico', 'image/x-icon') ?></Image>
<Image height="32" width="32" type="image/x-icon"><?= $url ?>/favicon.ico</Image>
<moz:SearchForm><?= $url ?>/torrents.php</moz:SearchForm>
<Query role="example" searchTerms="batman" />
<Developer><?= $SITENAME ?> Staff</Developer>
<Attribution><?= $attribution ?></Attribution>
<SyndicationRight>limited</SyndicationRight>
<Language>*</Language>
<InputEncoding>UTF-8</InputEncoding>
<OutputEncoding>UTF-8</OutputEncoding>
</OpenSearchDescription>
<?php
$Cache->end_whole_row();
$Cache->cache_page();
}
echo $Cache->next_row();
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。