2008年09月05日 星期五 [路日] [旧版首页]
我不介意你恨我啵一个一首歌真爱地图相反词来跳舞吧
爱在现实面前雨霖铃树叶的崇拜日不落完美故事冰冰
快乐童话嘟嘟娃娃路太弯差一点让我看着你客串情人
当前位置:首页 >> php类库 >> 读取网址内容的类Snoopy-1.2
在线连续剧免费播放:     五星大饭店     奋斗     血色浪漫     家有儿女     荣归     大明天子     连城诀    

读取网址内容的类Snoopy-1.2

作者:  发布时间:2005-08-17 >>  -收藏本页-

   Snoopy is a PHP class that simulates a web browser. It automates the
   task of retrieving web page content and posting forms, for example.
   Some of Snoopy's features:
  
   * easily fetch the contents of a web page
   * easily fetch the text from a web page (strip html tags)
   * easily fetch the the links from a web page
   * supports proxy hosts
   * supports basic user/pass authentication
   * supports setting user_agent, referer, cookies and header content
   * supports browser redirects, and controlled depth of redirects
   * expands fetched links to fully qualified URLs (default)
   * easily submit form data and retrieve the results
   * supports following html frames (added v0.92)
   * supports passing cookies on redirects (added v0.92)

  /*======================================================================*\
  Function: fetch
  Purpose: fetch the contents of a web page
  (and possibly other protocols in the
  future like ftp, nntp, gopher, etc.)
  Input: $URI the location of the page to fetch
  Output: $this->results the output text from the fetch
  /*======================================================================*\
  Function: submit
  Purpose: submit an http form
  Input: $URI the location to post the data
  $formvars the formvars to use.
  format: $formvars["var"] = "val";
  $formfiles an array of files to submit
  format: $formfiles["var"] = "/dir/filename.ext";
  Output: $this->results the text output from the post
  /*======================================================================*\
  Function: fetchlinks
  Purpose: fetch the links from a web page
  Input: $URI where you are fetching from
  Output: $this->results an array of the URLs
  /*======================================================================*\
  Function: fetchform
  Purpose: fetch the form elements from a web page
  Input: $URI where you are fetching from
  Output: $this->results the resulting html form
  /*======================================================================*\
  Function: fetchtext
  Purpose: fetch the text from a web page, stripping the links
  Input: $URI where you are fetching from
  Output: $this->results the text from the web page
  /*======================================================================*\
  Function: submitlinks
  Purpose: grab links from a form submission
  Input: $URI where you are submitting from
  Output: $this->results an array of the links from the post
  /*======================================================================*\
  Function: submittext
  Purpose: grab text from a form submission
  Input: $URI where you are submitting from
  Output: $this->results the text from the web page
  /*======================================================================*\
  Function: set_submit_multipart
  Purpose: Set the form submission content type to
  multipart/form-data
  /*======================================================================*\
  Function: set_submit_normal
  Purpose: Set the form submission content type to
  application/x-www-form-urlencoded

  http://sourceforge.net/projects/snoopy

·相关代码:
·相关下载:资料包
·本文总评分:20 分 给此网页评分:
·推荐给好友或网友
网址: UBB代码:
1楼 过客 认为:发表时间:2005年08月17日 22:18
非常好用的一个类,可以用来实现网站内容的抓取了。
我也说两句……  
用户名: 密码: 匿名发表 登陆 注册
图 像:
·请您对您的言行负责,遵守中华人民共和国有关法律、法规,尊重网上道德;
·承担一切因您的行为而直接或间接导致的民事或刑事法律责任;
·留言板管理人员有权保留或删除其管辖留言中的任意内容。
标题
关键字:音乐欣赏 益智游戏 开口一笑 网站建设 JAVASCRIPT VFP开发 常用下载 哲理小故事
除特别说明,本站点所有内容和作品都按照创作共用方式授权
本站点及发布平台统一使用 eaccelerator 优化,特此感谢。
联系站长 天外闲人 版权所有 琼ICP备05003420号 QQ群:39137597
[访问计数: 1657972]
alexa排名 | 191235