Ruby / libcurl应用

Ruby/libcurl is Ruby extention for libcurl supporting HTTP FTP SSL.
  • You can get html file from http server.
  • You can post strings to CGI.
  • with proxy, SSL, auth, cookie...
  • You can (get|put) files (from|to) ftp server.
  • Easy to write "Web Robot"
Get Ruby/libcurl 7.15.1 from rbCurl-7.15.1.tgz
tested on
  • FreeBSD
  • Debian GNU/Linux
  • Cygwin
example

require 'curl'

w = Curl.new
w.url = 'http://www.ruby-lang.org/'
#w.proxy = 'proxy.your.domain:8080'      # edit here!
w.followlocation = true
w.timeout = 20
w.perform
puts w.body_str
puts w.header_str



Ruby/libcurl 0.0.2 alpha rbCurl-0.0.2a0.tgz
Ruby/libcurl 0.0.1 rbCurl.tgz

你可能感兴趣的:(html,Web,ssl,File,Ruby)