先上圖
php
一、phpcms/libs/functions/extention.func.php 插入ajax
function checkBaiduIndex($url){ $url='http://www.baidu.com/s?wd='.$url; $curl=curl_init(); curl_setopt($curl,CURLOPT_URL,$url); curl_setopt($curl,CURLOPT_RETURNTRANSFER,1); $rs=curl_exec($curl); curl_close($curl); if(!strpos($rs,'抱歉,沒有找到')){ return '收錄'; }else{ return '未收錄'; } }
二、phpcms/modules/content/templates/content_list.tpl.phpcurl
找到<th><?php echo L('title');?></th>
url
下邊插入<th>收錄</th>
spa
找到<td align='center' title="<?php echo L('today_hits');?>:<?php echo $hits_r['dayviews'];?> <?php echo L('yestoday_hits');?>:<?php echo $hits_r['yesterdayviews'];?> <?php echo L('week_hits');?>:<?php echo $hits_r['weekviews'];?> <?php echo L('month_hits');?>:<?php echo $hits_r['monthviews'];?>"><?php echo $hits_r['views'];?></td>
大概105行code
上邊插入<td align='center' class="mylist"><?php echo checkBaiduIndex($r['url']);?></td>
blog
保存上傳便可查看效果。教程
ps:缺點--因爲不是ajax加載會致使列表頁面加載有點慢 求各位會的大神修改發出修改教程圖片