网页另存为即可
https://www.haowen100.com/mmnnn
有我的实用?我这可是在项目中实战过的。https://github.com/haowen100/caiji
caiji
一个使用PHP编写的采集类
快速开始
引入文件
require_once 'Caiji.php';
初始化对象
$caiji = new CaiJi($url);
设置相关采集参数
设置浏览器agent
$caiji->setAgent('Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.html)');
设置cookie
$caiji->setCookieFile('cookie.txt');
设置ip
$caiji->setIp('220.181.68.'.rand(100,200));
设置超时时间
$caiji->setTime($ruleConfig['timeOut']);
设置来源
$caiji->setRefer('http://www.baidu.com');
如果采集https网页内容,需要加上下面的代码
$caiji->setSsl(true);
获的采集数据
echo $caiji->getRes();
有,但我不告诉你
https://github.com/haowen100/caiji
是这些教程吗https://www.kancloud.cn/@daiji
再看看我的网站,好文100。百万级收录
@sembrono,那里不是有个cookie设置的方法吗?这个东西不需要你管,你只用就行了
@寻梦xunm,自己飞
@5258,你可以自己研究呀
请参考http://php.haowen100.com/read/wenzhang-14698.html
<?php
mysql_connect('127.0.0.1','root','root');
mysql_query("utf8");
mysql_select_db('test');
//显示表的结构
$result = mysql_query("desc a");
if (!$result){
var_dump($result);
die();
}
while ($row = mysql_fetch_assoc($result)){
var_dump($row);
}
echo "<hr/>";
//获取表的创建语句
$result = mysql_query("show create table a");
if (!$result){
var_dump($result);
die();
}
while ($row = mysql_fetch_assoc($result)){
var_dump($row);
}
@超级管理员,嗯
@问鼎,100php博客首页方法
额
打错了,是bootstrap
我。QQ1445023846。开发过两个网站,100php.cn,www.ijou.net。两个网站都是基于jQuery框架开发的。
100php.cn看的中联系我QQ1445023846。
@小时光,100php博客
请参考此文 http://www.100php.cn/read/wenzhang-4630.html
请看www.100php.cn