GithubHelp home page GithubHelp logo

marcookl / whois-api Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kylemclaren/whois-api

0.0 1.0 0.0 32 KB

A webservice using Slim Framework to search for domain name availability and WHOIS information.

PHP 85.71% Dockerfile 14.29%

whois-api's Introduction

whois-api

A webservice using Slim Framework to search for domain name availability and WHOIS information.

How it works

This service fetches data using Whois (RFC954) library for PHP and retuns the results for regrinfo. The response is an json containing, at least, an object 'regrinfo', containing the output from the whois lookup.

It fully supports IDNA (internationalized) domains names as defined in RFC3490, RFC3491, RFC3492 and RFC3454.

Running the service

This serive is dockerized and you can simply run it after building the image.

Usage

healthcheck

curl "http://localhost/"

analyze

curl "http://localhost/lookup?query=:url"
  • :url url of the page you want to inspect. (e.g. google.com)
  • :deep this is an optional parameter. If you just want to know if a domain is registered or not but do not care about getting the real owner information you can set: deep=false
  • :server and tld allow you to use a different whois server than the preconfigured or discovered one and must be used in conjuction The response is an json object containing the output from the whois lookup.
[
  {
    "regrinfo":
      {"domain":
        {"name":"cnn.com","nserver":
          {"ns1.p42.dynect.net":"208.78.70.42",
          "ns1.timewarner.net":"204.74.108.238",
          "ns2.p42.dynect.net":"204.13.250.42",
          "ns3.timewarner.net":"199.7.68.238"
          },
          "status":
            ["clientTransferProhibited https:\/\/icann.org\/epp#clientTransferProhibited",
            "serverDeleteProhibited https:\/\/icann.org\/epp#serverDeleteProhibited",
            "serverTransferProhibited https:\/\/icann.org\/epp#serverTransferProhibited",
            "serverUpdateProhibited https:\/\/icann.org\/epp#serverUpdateProhibited"
            ],
          "changed":"2013-08-29",
          "created":"1993-09-22",
          "expires":"2018-09-21"
        },
        "registered":"yes"
      },
    "regyinfo":
      {"registrar":"CSC CORPORATE DOMAINS, INC.",
        "referrer":"http:\/\/www.cscglobal.com\/global\/web\/csc\/digital-brand-services.html",
        "servers":[
          {"server":"com.whois-servers.net","args":"domain =cnn.com","port":43},
          {"server":"whois.corporatedomains.com","args":"cnn.com","port":43}
        ],"type":"domain"
      }
  }
]

whois-api's People

Contributors

containscode avatar andymathys avatar bcorijn avatar janpot avatar mklinga avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.