百度新闻协议 关于图片显示的问题
图片:
图片:
[attachment=16890] [attachment=16890] [attachment=16890] <?php
require_once(dirname(__FILE__)."/config.php");
if(empty($do)){
include './templets/baidunews.htm';
}else{
$baidunews = "<?xml version=\&;1.0\&; encoding=\&;gb18030\&; ?>\n";
$baidunews .= "<document>\n";
$baidunews .= "<webSite>$cfg_webname </webSite>\n";
$baidunews .= "<webMaster>$cfg_adminemail </webMaster>\n";
$baidunews .= "<updatePeri>$cfg_updateperi </updatePeri>\n";
$limit = $cfg_baidunews_limit;
if($limit > 100 || $limit < 1) $limit = 100;
$query = "select maintable.*, addtable.body, arctype.typename, arc.writer,arc.source
from [url=mailto:xkzzz_full_search]xkzzz_full_search[/url] maintable
left join [url=mailto:xkzzz_addonarticle]xkzzz_addonarticle[/url] addtable on addtable.aid=maintable.aid
left join [url=mailto:xkzzz_arctype]xkzzz_arctype[/url] arctype on arctype.ID=maintable.typeid
left join [url=mailto:xkzzz_archives]xkzzz_archives[/url] arc on arc.ID=maintable.aid
where maintable.channelid=1 order by maintable.uptime desc limit $limit
";
$dsql->SetQuery($query);
$dsql->execute();
while($row = $dsql->getarray()){
$title = htmlspecialchars($row['title']);
if(strpos($row['url'],'http://') === false){
$link = $cfg_basehost.$row['url'];
}else{
$link = $row['url'];
}
$link = htmlspecialchars($link);
$description = htmlspecialchars($row['addinfos']);
$description =str_replace(" ","", $description);//去除中文tab键产生的空白
$text = trim($row['body']);
//处理内容块;
$text =nl2br($text );
$text =strip_tags($text );
$text =str_replace(" ","", $text);
$text =str_replace("<","<", $text);
$text =str_replace(">",">", $text);
$text =str_replace("—","-", $text);
$text = preg_replace("/\ \;/i", " ", $text );
上一页12 下一页 阅读全文
您可能感兴趣的文章
- 12-07Dedecms默认模板用户评论扩展
- 12-07DEDECMS匿名发布文章的修改教程
- 12-07DedeTag Engine Create File False DEDE栏目生成错误
- 12-07DEDECMS两年的网站优化经验
- 12-07dedecms防止被挂马必看安全知识
- 12-07DedeCms完美的FLASH幻灯代码
- 12-07dedecms首页幻灯片显示问题帮助教程
- 12-07DedeCms栏目内容过多分为2行显示
- 12-07Dedecms自动更新首页html插件
- 12-07DEDECMS循环滚动图片制作教程


阅读排行
推荐教程
- 09-22IIs Web网站的添加及配置
- 12-04dedecms织梦dede:channel标签的数字递增调用方法
- 12-07DEDECMS的{dede:arclist}如何调用文章或软件的任何字段
- 12-05DEDECMS后台功能说明书
- 12-02织梦(DEDECMS)将data目录迁移到web根目录之外
- 12-07DEDECMS完美无缝整合UC心得
- 12-04DedeCMS织梦后台模板列表如何按字母排序方法代码
- 12-04DedeCms获取任意栏目N级列表链接树形菜单的方法
- 12-07dedecms首页幻灯片显示问题帮助教程
- 12-04详解织梦模板DEDECMS搜索结果调用自定义字段的方法





