Sha256: 2262fc090794ad4a3fac1b582416260dab3232fa7acced72974bb2ae04dcb211
Contents?: true
Size: 1.52 KB
Versions: 3
Compression:
Stored size: 1.52 KB
Contents
# FIRST EXAMPLE require 'rubygems' require '../lib/whois' w = Whois::Whois.new '72.14.207.99' w.search_whois # All return of request w.all # The ip return with object IPAddr w.ip # The server where the request has send w.server # The host of this IPv4 w.host # SECOND EXAMPLE require 'ipaddr' ip = IPAddr.new '72.17.207.99' w = Whois::Whois.new ip w.search_whois # All return of request w.all # The ip return with object IPAddr w.ip # The server where the request has send w.server # The host of this IPv4 w.host # THIRD EXAMPLE w = Whois::Whois.new '72.14.221.147', true w.search_whois # All return of request w.all # The ip return with object IPAddr w.ip # The server where the request has send w.server # The host of this IPv4 w.host #=> fg-in-f147.google.com # FOUR EXAMPLE w = Whois::Whois.new 'fg-in-f147.google.com' w.search_whois # All return of request w.all # The ip return with object IPAddr w.ip # The server where the request has send w.server # The host of this host w.host #=> fg-in-f147.google.com # FIFTH EXAMPLE w = Whois::Whois.new '2001:0660::' w.search_whois # All return of request w.all # The ip return with object IPAddr w.ip # The server where the request has send w.server # The host of this host w.host #=> fg-in-f147.google.com # SIX EXAMPLE w = Whois::Whois.new(IPAddr.new('2001:0660::')) w.search_whois # All return of request p w.all # The ip return with object IPAddr p w.ip # The server where the request has send p w.server # The host of this host p w.host #=> fg-in-f147.google.com
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
whois-0.4.2 | test/example.rb |
whois-0.4.0 | test/example.rb |
whois-0.4.1 | test/example.rb |