<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
<link href="http://feng.5z5d.com/lib/css/common.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="http://feng.5z5d.com/lib/js/jquery.min.js"></script>
<script type="text/javascript" src="http://static.oschina.net/js/syntax-highlighter-2.1.382/scripts/brush.js"></script>
<link type="text/css" rel="stylesheet" href="http://static.oschina.net/js/syntax-highlighter-2.1.382/styles/shCore.css"/>
<link type="text/css" rel="stylesheet" href="http://static.oschina.net/js/syntax-highlighter-2.1.382/styles/shThemeDefault.css"/>
</head>
<body>
<div style="width:960px; margin:0 auto">
<div style="width:100%; height:120px;">
</div>
<style>
.apilist{ padding-top:20px;}
.apilist li{ float:left; height:32px; line-height:32px;}
.apilist li a{ display:block; padding: 0 12px; border:#CCC 1px solid;}
.apilist li a:hover{ background:#EEE;}
.apiview{ padding-top:20px; line-height:28px;}
.demo li{ float:left;width:116px; overflow:hidden; text-align:left;}
.demo li a{ font-size:14px;width:116px; height:38px; line-height:38px; display:block; padding-left:0px; margin-left:10px;}
.demo li a:hover{text-decoration:underline;}
.demo li a img {width:16px; height:16px; float:left; padding-top:10px;}
.demo li a em { float:left;font-style: normal; font-size:14px; padding-left:4px;}
.demo li a em:hover{text-decoration:underline;}
</style>
<div style="width:100%; height: auto;">
<div style="font-size: 20px; font-weight:400;">Favicon.ico远程获取API</div>
<div style="width:100%; height: auto;" class="apiview">
<h1>API说明:</h1>
<p>远程实时获取并显示网站的Favicon.ico文件,美化网站外链显示效果。</p>
<h1>API演示:</h1>
<p>
<div class="demo">
<ul>
<li><a href="//www.baidu.com/" target="_blank"><img src="http://127.0.0.1//fav.php?url=www.baidu.com/" width="16" height="16">
<em>百度</em></a></li>
<li><a href="//mp.weixin.qq.com/" target="_blank"><img src="http://127.0.0.1//fav.php?url=mp.weixin.qq.com" width="16" height="16">
<em>微信</em></a></li>
<li><a href="//www.youku.com/" target="_blank"><img src="http://127.0.0.1//fav.php?url=www.youku.com" width="16" height="16">
<em>优酷网</em></a></li>
<li><a href="//www.tudou.com/" target="_blank"><img src="http://127.0.0.1//fav.php?url=www.tudou.com" width="16" height="16">
<em>土豆网</em></a></li>
<li><a href="//www.taobao.com/" target="_blank"><img src="http://127.0.0.1//fav.php?url=www.taobao.com" width="16" height="16">
<em>淘宝网</em></a></li>
</ul>
<div class="c"></div>
</div>
</p>
<h1>API代码:</h1>
<?php
$str= <<< EOT
<img src="http://127.0.0.1/fav.php?url=XXXXX">
//XXXXX部分为需要获取的目标网站网址 例如?url=www.baidu.com
EOT;
$str = htmlspecialchars($str);
?>
<div style="border:#CCC 1px solid; width:600px;">
<pre class='brush: java'>
<?php echo $str;?>
</pre>
</div>
<h1>开发说明:</h1>
<p>Favicon.ico文件的调用方式不限于此,更多的调用方法正在研究中,以及数据存储缓存优化等方面也在改善,欢迎提出意见!</p>
</div>
</div>
</div>
<script>
$(document).ready(function(){
SyntaxHighlighter.config.clipboardSwf = 'http://static.oschina.net/js/syntax-highlighter-2.1.382/scripts/clipboard.swf';
SyntaxHighlighter.all();
});
</script>
</body>
</html>