Delete
时间:2007-02-09
来源:互联网
[ 本帖最后由 lazy 于 2008-4-27 05:24 编辑 ]
作者: lazy 发布时间: 2007-02-09
作者: cator 发布时间: 2007-02-09
代码:
$Today=date('Ymd');$url="http://www.sogou.com/history/history_$Today.html";
$contents=file_get_contents($url);
function cut($file,$from,$end,$num=1){
$message=explode($from,$file);
$message=explode($end,$message[$num]);
return $message[0];
}
$data=cut($contents,"h1
","h1");
echo "历史上的今天 ".$data;
?>
放在blog上就很好看了
[ 本帖最后由 onlyou 于 2007-2-9 14:06 编辑 ]
作者: onlyou 发布时间: 2007-02-09
:D
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$contents= curl_exec($ch);
curl_close($ch);
作者: ※紫�� 发布时间: 2007-02-12
作者: leehui1983 发布时间: 2007-02-12
作者: hiler 发布时间: 2007-04-17
PHP代码:
$today = date('Ymd');$url = "http://www.sogou.com/history/history_$today.html";
$contents = file_get_contents($url);
preg_match_all("/\<div id\=\"content1\"\>(.+)\<div class\=\"extend\"\>/s", $contents, $m);
echo str_replace(array("<div class=\"extend\">", "\"/images/history/"), array("", "\"http://www.sogou.com/images/history/"), $m[0][0]);
作者: Zandy 发布时间: 2007-04-23
作者: 特蓝克斯 发布时间: 2007-04-23

作者: hohoqi 发布时间: 2007-11-08
引用:
原帖由 hohoqi 于 2007-11-8 04:30 发表弄个循环语句,把搜狗的资料采集入库.

省的每天去搞了
作者: psdshow 发布时间: 2007-11-08

作者: Ghoul 发布时间: 2007-11-08
<A class=link onclick="alert('请用右键另存为来下载照片n(Please right click and select save as...)');return false;" href=http://lalalalal.com/aaa/bbb/.gif target=_blank>
我自己用preg_match_all试了半天就是不成功。请大家帮忙写个语句。
作者: laplace 发布时间: 2007-11-20
PHP代码:
$LinkType = "href";$Regexp = '/[\\s]?(?:'.$LinkType.')[\\s]?=[\\s]?("(?:.+?)"|\'(?:.+?)\'|(?:.+?)[\\s>]?)(?:[\\s]+.*?)?>(.*?)<\/a>/sim';
preg_match($Regexp,$URL,$Array);
var_dump($Array):

作者: lazy 发布时间: 2007-11-21

作者: luzhou 发布时间: 2007-11-21



作者: strongability 发布时间: 2008-01-15
作者: dujiangtao 发布时间: 2008-01-16
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28