ViewDNS.info - Your one source for DNS related tools!
ViewDNS.info > API > Documentation >

GET HTTP Headers API



Documentation Home

TOOLS
Abuse Contact Lookup
ASN Lookup
Chinese Firewall Test
DNS Propagation Checker
DNS Record Lookup
DNS Report
DNSSEC Test
Domain/IP Whois
Free Email Lookup
Get HTTP Headers
Google Pagerank Checker
IP History
IP Location Finder
Iran Firewall Test
Is My Site Down
MAC Address Lookup
Ping
Port Scanner
Reverse DNS Lookup
Reverse IP Lookup
Reverse NS Lookup
Reverse Whois Lookup
Spam Database Lookup
Traceroute
URL/String Decode


GET HTTP Headers

Retrieves the HTTP headers of a remote domain. Useful in determining the web server (and version) in use and much more.

Note

http://pro.viewdns.info/httpheaders/

Parameters

domain - the domain to retrieve the HTTP headers for
output - the output format required ('xml' or 'json')
apikey - your api key

Sample Query

domain: twitter.com

GET http://pro.viewdns.info/httpheaders/?domain=twitter.com&apikey=yourapikey&output=output_type

XML Response (output=xml)

<?xml version='1.0' encoding='ISO-8859-1'?>
<viewdns>
  <query>
    <tool>httpheaders_PRO</tool>
    <domain>twitter.com</domain>
  </query>
  <response>
    <headers>
      <header>
        <name>http_status</name>
        <value>301</value>
      </header>
      <header>
        <name>connection</name>
        <value>close</value>
      </header>
      <header>
        <name>content-length</name>
        <value>0</value>
      </header>
      <header>
        <name>date</name>
        <value>Mon, 12 Jan 2015 23:40:39 UTC</value>
      </header>
      <header>
        <name>location</name>
        <value>https://twitter.com/</value>
      </header>
      <header>
        <name>server</name>
        <value>tsa_a</value>
      </header>
      <header>
        <name>set-cookie</name>
        <value>guest_id=v1%3A142110603911146633; Domain=.twitter.com; Path=/; Expires=Wed, 11-Jan-2017 23:40:39 UTC</value>
      </header>
      <header>
        <name>x-connection-hash</name>
        <value>9467983bb20e0e2912415463abcd0277</value>
      </header>
      <header>
        <name>x-response-time</name>
        <value>2</value>
      </header>
    </headers>
  </response>
</viewdns>

JSON Response (output=json)

{
    "query": {
        "tool": "httpheaders_PRO",
        "domain": "twitter.com"
    },
    "response": {
        "headers": [
            {
                "name": "http_status",
                "value": "301"
            },
            {
                "name": "connection",
                "value": "close"
            },
            {
                "name": "content-length",
                "value": "0"
            },
            {
                "name": "date",
                "value": "Mon, 12 Jan 2015 23:42:16 UTC"
            },
            {
                "name": "location",
                "value": "https://twitter.com/"
            },
            {
                "name": "server",
                "value": "tsa_a"
            },
            {
                "name": "set-cookie",
                "value": "guest_id=v1%3A142110612345448134; Domain=.twitter.com; Path=/; Expires=Wed, 11-Jan-2017 23:42:16 UTC"
            },
            {
                "name": "x-connection-hash",
                "value": "feb175daf57faabcde308af8372f0d8d"
            },
            {
                "name": "x-response-time",
                "value": "2"
            }
        ]
    }
}







All content © 2016 ViewDNS.info
Feedback / Suggestions / Contact Us   Become an Affiliate