Skip to content

Commit 6e50cdb

Browse files
committed
comwork baidu.csv 导入
1 parent bd49525 commit 6e50cdb

File tree

6 files changed

+235
-4
lines changed

6 files changed

+235
-4
lines changed

Application/Admin/Common/baidu.csv

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
google,google,https://www.gsslgle.com/
2+
google,百度云,http://so.baiduyun.me/
3+
google,代理,http://tkdaili.com/
4+
google,mirror,http://www.mirrorservice.org/
5+
google,语言,http://design.1sters.com/
6+
mvn,mvn-repo1,http://repository.sonatype.org/index.html
7+
mvn,mvn-repo2,http://www.mvnbrowser.com/
8+
mvn,mvn-repo3,http://www.mvnrepository.com/
9+
pdf,flyingSaucer,https://github.com/flyingsaucerproject/flyingsaucer
10+
pdf,flyingsaucer,https://code.google.com/p/flying-saucer/
11+
php,thinkphp,http://www.thinkphp.cn/info/155.html
12+
php,thinkphp_doc,http://www.thinkphp.cn/
13+
php,php之道,http://wulijun.github.io/php-the-right-way/
14+
php,标签库,http://doc.thinkphp.cn/manual/volist.html
15+
php,php扩展,http://windows.php.net/downloads/pecl/releases/
16+
php,php.net,http://php.net/
17+
hadoop,hadoop集群,http://www.cnblogs.com/xia520pi/archive/2012/05/16/2504205.html
18+
hadoop,ssh问题,https://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-setuid
19+
证书,资格证书,http://www.rkb.gov.cn/jsj/cms/ksjs/zgjj/
20+
证书,报名,http://218.249.204.167/websign_11/Default.aspx
21+
证书,等级考试,http://sk.neea.edu.cn/jsjdj/show_sort_3.jsp?class_id=26_14_01
22+
汽车票,汽车票,http://www.e2go.com.cn/
23+
汽车票,恐怖,http://a.444kblt.com/
24+
中国程序开发网站,open-open,http://www.open-open.com/
25+
struts,modelDriven接口,http://blog.csdn.net/li_tengfei/article/details/6098145
26+
spring,spring之ioc,http://sishuok.com/forum/blogPost/list/2428.html
27+
spring,springside-new,https://github.com/springside/springside4/wiki/QuickStart
28+
教程,IBM tutorial,http://www.ibm.com/developerworks/aix/library/au-threadingpython/
29+
教程,objective-c,http://blog.csdn.net/ldl22847/article/details/7482971
30+
教程,bootstrap,http://www.w3cschool.cc/bootstrap/bootstrap-forms.html
31+
待看,pythonReader,http://www.oschina.net/translate/python-parallelism-in-one-line
32+
c语言,c语言,http://blog.csdn.net/yxnk/article/details/5976699
33+
c语言,The GNU C Library,http://www.gnu.org/software/libc/manual/html_node/index.html?cp=3_0
34+
css,css_framework,http://api.jqueryui.com/theming/css-framework/
35+
css,menu,http://api.jqueryui.com/menu/
36+
css,bootstrap中文,http://www.bootcss.com/
37+
css,bootstrap官方文档,http://v3.bootcss.com/getting-started/
38+
JqueryUI,jqueryUI,http://jqueryui.com/
39+
JqueryUI,jqeury插件,http://www.iteye.com/topic/545971
40+
JqueryUI,canvas,http://www.jb51.net/html5/96843.html
41+
netty,netty,http://blog.csdn.net/kobejayandy/article/details/11493717
42+
netty,nio,http://tieba.baidu.com/p/2177598200
43+
netty,信步,http://blog.csdn.net/kobejayandy/article/details/8460152
44+
netty,doc,http://netty.io/
45+
MINE,myPage,https://makeyoufellgood.appspot.com/
46+
linux,bash,http://blog.csdn.net/zouyongjin/article/details/6644459
47+
linux,cp,http://www.cnblogs.com/xd502djj/archive/2011/11/25/2263562.html
48+
linux,cygwin_apt_cgy,https://code.google.com/p/apt-cyg/
49+
java,java,http://www.docjar.com/docs/api/sun/awt/shell/package-index.html
50+
java,javadoc,http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/sun/security/action/GetPropertyAction.java
51+
java,JTreeEg,http://www.blogjava.net/wangxinsh55/archive/2006/04/04/39219.html
52+
java,maven起步,http://spring.io/guides/gs/maven/
53+
java,参悟javascript,http://www.kankanews.com/ICkengine/archives/10561.shtml
54+
java,jsoup,http://www.ibm.com/developerworks/cn/java/j-lo-jsouphtml/
55+
java,bower依赖管理,http://blog.fens.me/nodejs-bower-intro/
56+
java,bootstrap,http://www.w3cschool.cc/bootstrap/bootstrap-glyphicons.html
57+
GAE,doc,https://developers.google.com/appengine/docs/python/urlfetch/asynchronousrequests?hl=zh-CN
58+
GAE,appMana,https://appengine.google.com/
59+
GAE,docc,https://developers.google.com/appengine/docs/
60+
GAE,webapp2,http://webapp-improved.appspot.com/api/webapp2.html
61+
GAE,djangoDbApi,https://docs.djangoproject.com/en/dev/ref/models/instances/
62+
GAE,tx,https://developers.google.com/appengine/docs/python/datastore/transactions
63+
GAE,dbquery,https://developers.google.com/appengine/docs/python/datastore/queries#Introduction_to_Indexes
64+
GAE,ndb,https://developers.google.com/appengine/docs/python/ndb/entities?hl=en
65+
社科(English),社科网站(English),http://slashdot.org/
66+
Django,文档,https://docs.djangoproject.com/en/1.6/
67+
Django,django,https://www.djangoproject.com/
68+
Django,book,http://djangobook.py3k.cn/2.0/
69+
python,python2,http://www.baidu.com/link?url=uykP2pQZ_VT48fn_ul_284Zdf2nZ2-4lieqNBJhTBIj3uvv5wSfw5MJrIhTSPUbuKW3mOVM0whHWE2pMXXadZK
70+
python,python3,http://woodpecker.org.cn/diveintopython3/
71+
python,wxpythonDoc,http://www.wxpython.org/docs/api/
72+
python,py,http://www.czug.org/python/wxpythoninaction/
73+
python,wxpythonstart,http://wiki.wxpython.org/Getting%20Started
74+
python,python在线教程,http://www.pythondoc.com/
75+
python,repo,http://www.mfunz.com/tag/repo/
76+
python,gae,https://developers.google.com/appengine/docs/python/overview?hl=zh-CN
77+
安卓开发,安卓sdk,http://developer.android.com/sdk/index.html
78+
安卓开发,opengl es,http://www.cnblogs.com/sunnychuh/archive/2011/07/20/2112110.html
79+
安卓开发,博客园,http://www.cnblogs.com/
80+
安卓开发,android,http://developer.android.com/reference/android/opengl/GLSurfaceView.html
81+
安卓开发,爱问共享,http://ishare.iask.sina.com.cn/
82+
安卓开发,androidSource,http://source.android.com/source/downloading.html
83+
安卓开发,androidSource1,http://blog.csdn.net/yanzi1225627/article/details/9255457
84+
安卓开发,adt-bundle-readme,http://developer.android.com/sdk/installing/bundle.html
85+
安卓开发,ubuntu更改源,http://hi.baidu.com/rayord/item/f3288e75df687c2fd7a89cbe
86+
学习工作,eoe,http://www.eoeandroid.com/
87+
学习工作,spring,http://www.springsource.org/download/community
88+
学习工作,开源中国,http://www.oschina.net/
89+
学习工作,w3cschool在线教程,http://www.w3school.com.cn/
90+
学习工作,公开课,http://open.163.com/ocw/
91+
学习工作,北风,http://www.ibeifeng.com/goods.php?id=282
92+
学习工作,extjs,http://extjs.org.cn/
93+
学习工作,ITPUB技术论坛,http://www.itpub.net/
94+
学习工作,chrome插件,https://developer.chrome.com/extensions/getstarted.html
95+
学习工作,360扩展,http://open.chrome.360.cn/extension_dev/overview.html
96+
学习工作,springside,http://www.springside.org.cn/
97+
学习工作,css-selectors,http://www.w3.org/TR/css3-selectors/
98+
学习工作,console-api,http://getfirebug.com/wiki/index.php/Console_API
99+
学习工作,xpath,http://www.w3schools.com/xpath/
100+
学习工作,w3schools,http://www.w3schools.com/
101+
学习工作,Iteye,http://www.iteye.com/
102+
学习工作,地图api,https://developers.google.com/maps/documentation/staticmaps/?csw=1&hl=zh-CN#MapTypes
103+
学习工作,google-api,https://developers.google.com/maps/documentation/javascript/reference?hl=zh-CN
104+
学习工作,源码,http://www.cnblogs.com/nuysoft/archive/2011/11/14/2248023.html
105+
学习工作,即时网页,http://jsfiddle.net/CxL6W/
106+
学习工作,supermap,http://support.supermap.com.cn:8090/iserver/iClient/forJavaScript/index.html
107+
学习工作,supermap2,http://support.supermap.com.cn:8090/iserver/help/html/index.htm
108+
学习工作,百度地图示例,http://developer.baidu.com/map/library.htm
109+
学习工作,百度map,http://blog.csdn.net/mrzhangpan/article/details/6611432
110+
学习工作,javascript,http://www.cnblogs.com/jenry/category/51530.html
111+
学习工作,jquery validate,http://dev.mjxy.cn/a-Form-validation-using-JQuery.aspx
112+
学习工作,ibm tec,http://www.ibm.com/developerworks/cn/opensource/os-eclipse-plugindev1/
113+
学习工作,s图,http://support.supermap.com.cn/ProductCenter/ResourceCenter/SampleCode.aspx
114+
学习工作,百度云,http://developer.baidu.com/wiki/index.php?title=%E5%B8%AE%E5%8A%A9%E6%96%87%E6%A1%A3%E9%A6%96%E9%A1%B5/%E8%B5%84%E6%BA%90%E4%B8%8B%E8%BD%BD
115+
学习工作,ubuntu镜像,http://ubuntu.dormforce.net/
116+
学习工作,office,http://office.microsoft.com/zh-cn/excel-help/HP010342656.aspx?CTT=1
117+
学习工作,poi操作名称,http://blog.csdn.net/wed840313/article/details/7546134
118+
学习工作,poi-names,http://svn.apache.org/repos/asf/poi/trunk/src/examples/src/org/apache/poi/ss/examples/LoanCalculator.java
119+
学习工作,sqlplus,http://218.206.236.214/monitor/admin/system/sqlplus.action
120+
学习工作,vpn,http://www.freevpnmac.com/macvpn/
121+
未分类,尚学堂科技,http://www.verycd.com/topics/93279/
122+
未分类,北京尚学堂java,http://www.bjsxt.com/shipinxiazai/
123+
未分类,你懂的,http://simplecd.me/
124+
未分类,百度地图api,http://developer.baidu.com/map/
125+
未分类,root,http://jiyouhui.it168.com/thread-258125-1-1.html
126+
未分类,铁路客服中心,http://www.12306.cn/mormhweb/
127+
未分类,小米手机2s32gb,http://p.www.xiaomi.com/open/index.html
128+
未分类,ubuntu,http://pan.baidu.com/share/link?shareid=1020560503&uk=1125362416
129+
未分类,poi操作,http://www.programming-free.com/2012/12/create-charts-in-excel-using-java.html
130+
未分类,wiki,http://zh.wikipedia.org/wiki/Wikipedia:%E9%A6%96%E9%A1%B5
131+
未分类,linux网盘,http://www.freehao123.com/baiduyun-linux-vps/
132+
未分类,面试,http://www.diguage.com/archives/66.html
133+
未分类,电影插件,http://www.baidu.com/link?url=pQGFvDBpvbMctvO6fK17wRK-j1uEYY_LTOSxEt1_9X88Z9YjSD5DG9YiAwx3YEuNZfGAIwq9Ol3f38XQb8B3u0CuEmw3eXvFpSh96nw23fS
134+
未分类,aa,http://ta46.com/
135+
未分类,支付宝原理,http://www.douban.com/note/223773046/
136+
未分类,looklook,http://v.qq.com/cover/8/8rl69xr9conmlt8/i0123m24u17.html?pgv_ref=aio2012&ptlang=2052
137+
未分类,aaa,http://www.141jav.com/
138+
未分类,js,http://blog.fens.me/angularjs-express3-bootstrap3/
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?php
2+
/**
3+
* Created by PhpStorm.
4+
* User: Administrator
5+
* Date: 14-8-1
6+
* Time: 下午4:31
7+
*/
8+
namespace Admin\Controller;
9+
header("Content-type: text/html; charset=utf-8");
10+
class UtilController extends AdminController{
11+
public function index(){
12+
$path=APP_PATH."Admin/Common/baidu.csv";
13+
// $content=file_get_contents($path);
14+
// echo $content;
15+
$f=fopen($path,"r");
16+
$topic=M("Topic");
17+
while(!feof($f)){
18+
$line=fgets($f);
19+
}
20+
}
21+
}

Application/Admin/View/Index/navbar.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
<li><a href="{:U('Admin/Soft/index')}">删除</a></li>
2121
</ul>
2222
</li>
23+
<li><a href="{:U('Admin/Util/index')}">导入csv文件</a></li>
2324
</ul>
2425

2526
<ul class="nav navbar-nav navbar-right">

Application/Craw/Controller/IndexController.class.php

Lines changed: 73 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,83 @@
11
<?php
22
namespace Craw\Controller;
33
use Think\Controller;
4-
use Vendor\Snoopy\Snoopy;
54
header("Content-type: text/html; charset=utf-8");
65

76
class IndexController extends Controller {
87
public function index(){
9-
$snoopy=new Snoopy();
10-
$this->display();
8+
// import('Snoopy.Snoopy',VENDOR_PATH,'.class.php');
9+
Vendor("Snoopy.Snoopy","",".class.php");
10+
$snoopy=new \Snoopy();
11+
//设置snoopy,登录并且获取百度信息
12+
$uri="http://www.baidu.com/index.php?tn=monline_5_dg";
13+
// need an proxy?
14+
// $snoopy->proxy_host = "";
15+
// $snoopy->proxy_port = "";
16+
17+
// set browser and referer:
18+
$snoopy->agent = "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.101 Safari/537.36";
19+
$snoopy->referer = "http://start.firefoxchina.cn/";
20+
$cookies="BAIDUID=9EB0865E6598C8CA005C98EB7E75E11B:FG=1; BDUSS=Q2OGFKOGwzUGxiOHJ5V05Kc0tmcjRSU1FVcmpzNTlCdmgwVy05V3FRSHpIdmhUQVFBQUFBJCQAAAAAAAAAAAEAAADkQy8XanNwZGJhAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPOR0FPzkdBTRW; BD_UPN=133143; BDRCVFR[kpkBv0s1F-3]=G01CoNuskzfuh-zuyuEXAPCpy49QhP8";
21+
$splice=explode(";",$cookies);
22+
foreach($splice as $key=>$value){
23+
$map=explode("=",$value);
24+
if(sizeof($map)==2){
25+
// $cookieArray[$map[0]]=$map[1];
26+
// set some cookies:
27+
$snoopy->cookies[$map[0]]=$map[1];
28+
}else{
29+
// $cookieArray[$map[0]]=$map[1]."=".$map[2];
30+
// set some cookies:
31+
$snoopy->cookies[$map[0]]=$map[1]."=".$map[2];
32+
}
33+
}
34+
// dump($cookieArray);
35+
// return;
36+
// // set some cookies:
37+
// $snoopy->cookies[""] = '';
38+
39+
// set an raw-header:
40+
$snoopy->rawheaders["Accept"] = "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8";
41+
$snoopy->rawheaders["Accept-Encoding"] = "gzip,deflate";
42+
$snoopy->rawheaders["Accept-Language"] = "zh-CN,zh;q=0.8";
43+
$snoopy->rawheaders["Cache-Control"] = "max-age=0";
44+
$snoopy->rawheaders["Connection"] = "keep-alive";
45+
$snoopy->rawheaders["host"] = "www.baidu.com";
46+
47+
// set some internal variables:
48+
$snoopy->maxredirs = 2;
49+
$snoopy->offsiteok = false;
50+
$snoopy->expandlinks = false;
51+
$snoopy->read_timeout=3; //读取超时时间
52+
53+
// set username and password (optional)
54+
//$snoopy->user = "joe";
55+
//$snoopy->pass = "bloe";
56+
57+
// fetch the text of the website www.google.com:
58+
if($snoopy->fetchtext($uri)){
59+
// other methods: fetch, fetchform, fetchlinks, submittext and submitlinks
60+
61+
// response code:
62+
//print "response code: ".$snoopy->response_code."<br/>\n";
63+
64+
// print the headers:
65+
//print "<b>Headers:</b><br/>";
66+
//while(list($key,$val) = each($snoopy->headers)){
67+
// print $key.": ".$val."<br/>\n";
68+
//}
69+
70+
// print the texts of the website:
71+
//print_r( json_decode($snoopy->results) );
72+
73+
if($snoopy->results){
74+
echo $snoopy->results."\r\n";
75+
}
76+
}
77+
78+
79+
// $this->display();
80+
1181
}
1282

1383
/**

Application/Runtime/Cache/Admin/b595b808c2ebeeeb0478ffc30bb4e87a.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
<li><a href="<?php echo U('Admin/Soft/index');?>">删除</a></li>
4646
</ul>
4747
</li>
48+
<li><a href="<?php echo U('Admin/Util/index');?>">导入csv文件</a></li>
4849
</ul>
4950

5051
<ul class="nav navbar-nav navbar-right">

Application/index.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)