The whois gem is a Ruby library that provides a client for querying WHOIS servers. WHOIS is a protocol used to query databases that store information about the registered users of an Internet resource, such as a domain name or an IP address block. The whois gem allows you to perform WHOIS lookups and retrieve information about domain registrations.
Key Features:
Query WHOIS servers to get information about domain names.
Parse WHOIS responses to extract useful information such as domain status, registration dates, and contact details.
Support for various WHOIS servers and TLDs (Top-Level Domains).
Installation:
To install the whois gem, you can add it to your Gemfile and run bundle install:
gem 'whois'
Then run:
bundle install
Usage Example:
Here's a simple example of how to use the whois gem to perform a WHOIS lookup:
require 'whois'
# Create a new WHOIS client
client = Whois::Client.new
# Perform a WHOIS lookup for a domain
record = client.lookup("example.com")
# Print the WHOIS record
puts record
# Access specific information from the WHOIS record
puts "Domain: #{record.domain}"
puts "Status: #{record.status}"
puts "Created on: #{record.created_on}"
puts "Expires on: #{record.expires_on}"
puts "Registrar: #{record.registrar.name}"
This example demonstrates how to create a WHOIS client, perform a lookup for a domain, and access specific information from the WHOIS record.
Documentation:
For more detailed information and advanced usage, you can refer to the official documentation:
Just a heads up -- this issue is being marked stale (open 90 days with no activity). It will close automatically in a few weeks. You can comment or remove the stale label to restart the clock.
The
whois
gem is a Ruby library that provides a client for querying WHOIS servers. WHOIS is a protocol used to query databases that store information about the registered users of an Internet resource, such as a domain name or an IP address block. Thewhois
gem allows you to perform WHOIS lookups and retrieve information about domain registrations.Key Features:
Installation:
To install the
whois
gem, you can add it to your Gemfile and runbundle install
:Then run:
Usage Example:
Here's a simple example of how to use the
whois
gem to perform a WHOIS lookup:This example demonstrates how to create a WHOIS client, perform a lookup for a domain, and access specific information from the WHOIS record.
Documentation:
For more detailed information and advanced usage, you can refer to the official documentation: