摘要
设计并实现了一个基于CURL的网络学习资源聚合系统.利用CURL多线程函数将数据使用GET或POST方式同时发送给所有资源网站,对资源网站返回的HTML代码进行统一编码,使用正则表达式提取返回代码的搜索结果区域,使用PHP DOM操作类修正代码中的图像和链接的URL地址,再将所有返回代码载入到同一个页面中,并使用瀑布流模型实现逐段加载.
We design and implement a polymerization system for web learning resources based on CURL. Using the CURL multi-threading functions, the system can send data to all resource websites at the same time through GET or POST method. And then the system can unify all returned HTML codes from resources websites, and use regular expressions to extract the search results area of the returned codes. It uses PHP DOM manipulation class to fix the image and the URL addresses of links in the code, and then loads all returned code into the same page. Thus it can realize piecewise loading by using waterfall flow model.
出处
《计算机系统应用》
2017年第6期263-266,共4页
Computer Systems & Applications
基金
湖南省教育科学"十二五"规划一般资助课题(XJK013BXX005)
衡阳市科技计划(2016KJ02)
关键词
CURL
学习资源
聚合
CURL
learning resources
polymerization