GithubHelp home page GithubHelp logo

whoisparser's People

Contributors

adduc avatar allenjb avatar arendjantetteroo avatar bedemiralp avatar danielkraaijbax avatar estshy avatar koroban avatar salemgolemugoo avatar shmee avatar vraxoin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

whoisparser's Issues

.io domains not parsed propery

Create and execute the following file

lookup($domain); var_dump($result); Seems like the Ruby whois library is using whois.nic.io https://github.com/weppos/whois/blob/master/data/tld.json I can work on a PR, although I'm not a Regex master.

Lack of documentation

Hi,

thanks for the great class. It is basically up and running and I am able to get a "creation date" (as in your example).

But how can I get e.g. owner email, registrar name, ...

HAving some examples would be perfect.

Thx,
Gerold

Strict Error: Declaration of Novutec\WhoisParser\Templates\Br

using latest version

Strict Error: Declaration of Novutec\WhoisParser\Templates\Br::translateRawData(
) should be compatible with Novutec\WhoisParser\Templates\Type\AbstractTemplate:
:translateRawData($rawdata, $config) in [Vendor\novutec\whoisparser\Templates\Br.php, line 84]

PHP5.5.6 is not parsing registrar data

Using PHP5.5.6Mavericks Server/WhoisParser it parses gtld info but doesn't parse the registrar data. See below for godaddy test:

testwhois.php:

lookup("CRAKPASS.COM"); echo $result->created; print_r($result); ?>

$ php testwhois.php
2010-02-12 00:00:00Novutec\WhoisParser\Result Object
(
[name:protected] => crakpass.com
[idnName:protected] => crakpass.com
[status:protected] => Array
(
[0] => clientDeleteProhibited
[1] => clientRenewProhibited
[2] => clientTransferProhibited
[3] => clientUpdateProhibited
)

[nameserver:protected] => Array
    (
        [0] => NS1.WEBDNSPROVIDER.COM
        [1] => NS2.WEBDNSPROVIDER.COM
        [2] => NS3.WEBDNSPROVIDER.COM
    )

[ips:protected] => 
[created:protected] => 2010-02-12 00:00:00
[changed:protected] => 2012-01-06 00:00:00
[expires:protected] => 2015-02-12 00:00:00
[registered:protected] => 1
[dnssec:protected] => 
[whoisserver:protected] => whois.godaddy.com
[contacts:protected] => stdClass Object
    (
    )

[registrar:protected] => Novutec\WhoisParser\Registrar Object
    (
        [id:protected] => 
        [name:protected] => GODADDY.COM, LLC
        [email:protected] => 
        [url:protected] => http://registrar.godaddy.com
    )

[rawdata:protected] => Array
    (
        [0] => Domain Name: CRAKPASS.COM
        [1] => Registry Domain ID: 1585206460_DOMAIN_COM-VRSN
        [2] => Registrar WHOIS Server: whois.godaddy.com
        [3] => Registrar URL: http://www.godaddy.com
        [4] => Update Date: 2012-01-06 11:37:07
        [5] => Creation Date: 2010-02-12 11:08:08
        [6] => Registrar Registration Expiration Date: 2015-02-12 11:08:08
        [7] => Registrar: GoDaddy.com, LLC
        [8] => Registrar IANA ID: 146
        [9] => Registrar Abuse Contact Email: [email protected]
        [10] => Registrar Abuse Contact Phone: +1.480-624-2505
        [11] => Domain Status: clientTransferProhibited
        [12] => Domain Status: clientUpdateProhibited
        [13] => Domain Status: clientRenewProhibited
        [14] => Domain Status: clientDeleteProhibited
        [15] => Registry Registrant ID: 
        [16] => Registrant Name: Registration Private
        [17] => Registrant Organization: Domains By Proxy, LLC
        [18] => Registrant Street: DomainsByProxy.com
        [19] => Registrant Street: 14747 N Northsight Blvd Suite 111, PMB 309
        [20] => Registrant City: Scottsdale
        [21] => Registrant State/Province: Arizona
        [22] => Registrant Postal Code: 85260
        [23] => Registrant Country: United States
        [24] => Registrant Phone: +1.4806242599
        [25] => Registrant Phone Ext: 
        [26] => Registrant Fax: +1.4806242598
        [27] => Registrant Fax Ext: 
        [28] => Registrant Email: [email protected]
        [29] => Registry Admin ID: 
        [30] => Admin Name: Registration Private
        [31] => Admin Organization: Domains By Proxy, LLC
        [32] => Admin Street: DomainsByProxy.com
        [33] => Admin Street: 14747 N Northsight Blvd Suite 111, PMB 309
        [34] => Admin City: Scottsdale
        [35] => Admin State/Province: Arizona
        [36] => Admin Postal Code: 85260
        [37] => Admin Country: United States
        [38] => Admin Phone: +1.4806242599
        [39] => Admin Phone Ext: 
        [40] => Admin Fax: +1.4806242598
        [41] => Admin Fax Ext: 
        [42] => Admin Email: [email protected]
        [43] => Registry Tech ID: 
        [44] => Tech Name: Registration Private
        [45] => Tech Organization: Domains By Proxy, LLC
        [46] => Tech Street: DomainsByProxy.com
        [47] => Tech Street: 14747 N Northsight Blvd Suite 111, PMB 309
        [48] => Tech City: Scottsdale
        [49] => Tech State/Province: Arizona
        [50] => Tech Postal Code: 85260
        [51] => Tech Country: United States
        [52] => Tech Phone: +1.4806242599
        [53] => Tech Phone Ext: 
        [54] => Tech Fax: +1.4806242598
        [55] => Tech Fax Ext: 
        [56] => Tech Email: [email protected]
        [57] => Name Server: NS1.WEBDNSPROVIDER.COM
        [58] => Name Server: NS2.WEBDNSPROVIDER.COM
        [59] => Name Server: NS3.WEBDNSPROVIDER.COM
        [60] => DNSSEC: unsigned
        [61] => URL of the ICANN WHOIS Data Problem Reporting System: http://wdprs.internic.net/
        [62] => Last update of WHOIS database: 2014-01-02T21:00:00Z
        [63] => 
        [64] => The data contained in GoDaddy.com, LLC's WhoIs database,
        [65] => while believed by the company to be reliable, is provided "as is"
        [66] => with no guarantee or warranties regarding its accuracy.  This
        [67] => information is provided for the sole purpose of assisting you
        [68] => in obtaining information about domain name registration records.
        [69] => Any use of this data for any other purpose is expressly forbidden without the prior written
        [70] => permission of GoDaddy.com, LLC.  By submitting an inquiry,
        [71] => you agree to these terms of usage and limitations of warranty.  In particular,
        [72] => you agree not to use this data to allow, enable, or otherwise make possible,
        [73] => dissemination or collection of this data, in part or in its entirety, for any
        [74] => purpose, such as the transmission of unsolicited advertising and
        [75] => and solicitations of any kind, including spam.  You further agree
        [76] => not to use this data to enable high volume, automated or robotic electronic
        [77] => processes designed to collect or compile this data for any purpose,
        [78] => including mining this data for your own personal or commercial purposes. 
        [79] => 
        [80] => Please note: the registrant of the domain name is specified
        [81] => in the "registrant" section.  In most cases, GoDaddy.com, LLC 
        [82] => is not the registrant of domain names listed in this database.
        [83] => 
    )

[network:protected] => 
[exception:protected] => 
[parsedContacts:protected] => 
[template:protected] => gtld_godaddy

)

master ref seems broken

Tried to clone the repo and ran into the following error:

$ git clone https://github.com/novutec/WhoisParser.git
Initialized empty Git repository in /home/oleg/WhoisParser/.git/
remote: Counting objects: 390, done.
remote: Compressing objects: 100% (78/78), done.
remote: Total 390 (delta 312), reused 390 (delta 312)
Receiving objects: 100% (390/390), 158.16 KiB | 232 KiB/s, done.
Resolving deltas: 100% (312/312), done.
error: refs/remotes/origin/master does not point to a valid object!
error: Trying to write ref refs/heads/master with nonexistant object 03e033769f4fc1d17244eb83a4ecb4c0c533884a
fatal: Cannot update the ref 'HEAD'.

Contacts list Issue

Hi Team,

when i requested whois parser. there is empty result of contacts only. others are displaying good. Please reply me that.

Thanks

Cannot parse country when using .ch/switch template

I get the following error when querying for whois on a .ch domain:

PHP Notice:  Undefined offset: 4 in /[...]/Templates/Switch.php on line 103

It seems the country isn't correctly parsed.

https://github.com/novutec/WhoisParser/blob/master/Templates/Switch.php#L103

This is the data I get from the whois query:

whois: This information is subject to an Acceptable Use Policy.
See http://www.nic.ch/terms/aup.html


Domain name:
johnsmith.ch

Holder of domain name:
smith john
teststreet 11
CH-1234 City
Switzerland
Contractual Language: German

Technical contact:
smith john
teststreet 11
CH-1234 City
Switzerland

DNSSEC:N

Name servers:
[...]

Error on BR template

ErrorException

Declaration of Novutec\WhoisParser\Templates\Br::translateRawData() should be compatible with Novutec\WhoisParser\Templates\Type\AbstractTemplate::translateRawData($rawdata, $config)

Missing the second parameter $config on the translateRawData method in the Templates\Br class.
Thanks

Installation via composer fails with Runtime Exception

Trying to install dependencies throught composer throws this error message:

root@xyz:/my/path/to/project/htdocs# php composer.phar install
Loading composer repositories with package information Installing dependencies (including require-dev)

  • Installing novutec/whoisparser (dev-master 4549621)
    Cloning 4549621

    [RuntimeException]
    Failed to clone https://github.com/novutec/WhoisParser.git via git, https protocols, aborting.

  • git://github.com/novutec/WhoisParser.git
    error: refs/remotes/origin/master does not point to a valid object!
    error: Trying to write ref refs/heads/master with nonexistant object 4549621
    fatal: Cannot update the ref 'HEAD'.

  • https://github.com/novutec/WhoisParser.git
    error: refs/remotes/origin/master does not point to a valid object!
    error: Trying to write ref refs/heads/master with nonexistant object 4549621
    fatal: Cannot update the ref 'HEAD'.

Runing the following composer.json:

"repositories": [
    {
        "type": "vcs",
        "url": "https://github.com/novutec/DomainParser.git"
    },
    {
        "type": "vcs",
        "url": "https://github.com/novutec/WhoisParser.git"
    }
],
"require": {
    "guzzle/guzzle": "~3.7",
    "jwage/purl": "0.0.2",
    "willdurand/geocoder" : "~2.0",
    "league/geotools": "~0.3",
    "novutec/DomainParser": "dev-master as 2.0.0",
    "novutec/WhoisParser": "dev-master as 3.1.0",
    "themattharris/tmhOAuth": "0.8.1"
},
"require-dev": {
    "phpunit/phpunit": "3.7.21"
}

runexc-screen

Thanks for any solutions and help.

Best regards

Suggestion: Include whois output for each template

Include a copy of example raw whois output for each template. This would make it easy for developers to see when a template needs updating because the whois output it was written against has changed.

Domani .it not working properly

I've tested with prestiti.it and got

Notice: Undefined offset: 1 in E:\wamp\www\Whois\WhoisParser\Templates\It.php on line 111

Detect and handle blocks / query limits

Many servers have query limits (daily / hourly request limits) and some require an account to make queries (.es for example). It would be nice if the code detected these cases and handled them explicitly.

Missing Information

A number of the domains I tested did not return all the available information (possibly the templates are out of date). The list is as follows:

.as - creation date, nameservers, registrant, status, registrar, dnssec - sent.as
gtld_schlund - xoxox.cc
.co.cc - rockuniverze.co.cc
.eu
enom - whois.enom.com - uni.cc
rrpproxy - whois.udag.net - centermail.net
.com.hk - yahoo.com.hk - Nameserver list is not parsed correctly
tk - registered, nameservers
.st - nameservers, update/create/expires dates, registrar - fea.st

Cannot install dependencies via composer

When I try to install via composer install, the installation fails. It seems the dependency isn't listed with packagist yet.

(4549621...) ~/Code/WhoisParser > composer install
Loading composer repositories with package information
Installing dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - The requested package novutec/domainparser could not be found in any version, there may be a typo in the package name.

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details.

Read <http://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

Missing Templates

I did a bunch of testing which showed up various missing templates. I wanted to post these to the tracker so others don't have to repeat the testing I've already done. I've decided to post these as a single issue rather than spamming the tracker.

(Note: I only started recording the domain I tested part-way through, so some are missing example domains - sorry)

.ar - mailcatch.loveafraid.com.ar
.cl - googlemail.cl
.dj - mega.zik.dj
.ga - bundes-li.ga
.gr - hotmail.gr
.hu
.ph - yahoo.com.ph
.ru
.se - slaskpost.se
.si - inbox.si
.su
.to - ag.us.to
.vn
.vu - harvard.edu.tr.vu
.za
whois.godomaingo.com - whatiaas.com
whois.yesnic.com - rockuniverze.co.cc

Changes PHP Timezone

Parser.php -l 157:

date_default_timezone_set('UTC');

This changes the timezone I already have set and throws off my dates. I'm pretty sure this should be set outside of your library.

.sh tld returning errors

trying to find whois for rajnee.sh getting this error:

Strict standards: Declaration of Novutec\WhoisParser\Templates\Icb::translateRawData() should be compatible with Novutec\WhoisParser\Templates\Type\AbstractTemplate::translateRawData($rawdata, $config) in vendor/novutec/whoisparser/Templates/Icb.php on line 38

after fixing this issue and retrying whois data is returning javascript code included int from that registrar page
function googleTranslateElementInit() { new google.translate.TranslateElement({ pageLanguage: 'en', layout: google.translate.TranslateElement.InlineLayout.SIMPLE }, 'google_translate_element'); }

also registered property is displaying wrong result .Tried with afasfasf.sh and though it is available to register scripts says registered=1

.ch parsing of non-organizational holder contact (SWITCH)

Hi there

parsing of SWITCH whois records (.ch/.li domains) won't work in current master (03e0337) for domain holders without organization name. My fix in Templates/Switchnic.php:

# diff -u Switchnic_03e0337.php Switchnic.php 
--- Switchnic_03e0337.php   2014-12-09 16:11:15.000000000 +0100
+++ Switchnic.php   2014-12-09 16:14:37.000000000 +0100
@@ -107,6 +107,13 @@
                         $contactObject->city = $filteredAddress[3];
                         $contactObject->address = $filteredAddress[2];
                         break;
+                    case 4:
+                        $contactObject->organization = '';
+                        $contactObject->name         = $filteredAddress[0];
+                        $contactObject->country      = $filteredAddress[3];
+                        $contactObject->city         = $filteredAddress[2];
+                        $contactObject->address      = $filteredAddress[1];
+                        break;
                     default:
                         //do nothing.
                 }

Thanks.
Best regards, Philip

Class name error

PHP 7, we have:

PHP Fatal error: Cannot use 'Int' as class name as it is reserved in /vendor/novutec/whoisparser/Templates/Int.php on line 37.

Can you rename class to, for example, TemplateInt?

composer install fails

Hello,
"Composer install" doesn't work on WhoisParser.
I don't think it's a problem on my end because DomainParser and other projects worked well with "composer install".

Hope to hear from you guys.

ASN request problems (ASxxx)

Hello,

I checked templates and most of them is missing ASN parsing like (aut-num, as-block) only RIPE has as-block included but is broken. Are you doing anything on this?

Best regards,

Whois history is lost for multiple queries

Only the name/address and raw output of the most recent whois query is maintained, even tho in many cases multiple queries are performed to get all the information available. Ideally, I think that the entire list of whois servers and raw output from each should be maintained in the results.

.gl has wrong information in registered

if you check a domain like "testtest.gl" is says that the domain is registered
but it's not

Check testtest.gl
Not available
Novutec\WhoisParser\Result\Result::__set_state(array(
   'name' => 'testtest.gl',
   'idnName' => 'testtest.gl',
   'status' => NULL,
   'nameserver' => NULL,
   'ips' => NULL,
   'created' => NULL,
   'changed' => NULL,
   'expires' => NULL,
   'registered' => true,
   'dnssec' => NULL,
   'whoisserver' => 'whois.nic.gl',
   'contacts' =>
  stdClass::__set_state(array(
  )),
   'registrar' => NULL,
   'rawdata' =>
  array (
    0 => 'Domain Name: testtest.gl
Domain Status: No Object Found

>>> Last update of WHOIS database: 2015-11-09T09:17:49.012Z <<<
',
  ),
   'network' => NULL,
   'exception' => NULL,
   'parsedContacts' => false,
   'template' =>
  array (
    'whois.nic.gl' => 'cocca',
  ),
))

Domains using Incorrect Nameservers

The following domains either have incorrect nameservers in the configuration, or don't travel the tree of whois servers correctly:

.id - whois server should be whois.pandi.or.id - mobi.web.id
.nf - whois server should be whois.nic.nf - monmail.fr.nf
.cx - whois server should be whois.nic.cx - nomail.xl.cx

.com lookup returns inconsistent results

Using domain adduc.com, the library returns correct registration from GoDaddy's records some of the time, and no match the rest of the time.

From what I can debug, this is an issue with the Verisign Whois server. Are there any other .com whois servers that could be used instead?

$this->proxyList is an empty array on Line 145 of Socket.php

Line 145 of Socket.php reads:
if ($this->proxyList !== false) {
$this->proxyList = $this->getProxyList();
}

I correctly updated proxy.ini but it doesn't appear to be using my proxies. I think it is because $this->proxyList is always being evaluated as array(). For now, I've commented out the if statement in order to use my proxies. Is this correct?

Templates with PHP Errors

A number of templates threw PHP notices / errors during my testing:

.ch - blacklist.woody.ch
Severity: Notice
Message: Undefined offset: 4
Filename: Templates/Switch.php
Line Number: 103
---
Severity: Notice
Message: Undefined offset: 4
Filename: Templates/Switch.php
Line Number: 103

.fr (afnic) - yopmail.fr
Severity: Warning
Message: end() expects parameter 1 to be array, null given
Filename: Templates/Afnic.php
Line Number: 125
---
Severity: Warning
Message: array_pop() expects parameter 1 to be array, null given
Filename: Templates/Afnic.php
Line Number: 128
---
Severity: Warning
Message: array_values() expects parameter 1 to be array, null given
Filename: Templates/Afnic.php
Line Number: 129
---
Severity: Warning
Message: end() expects parameter 1 to be array, null given
Filename: Templates/Afnic.php
Line Number: 122
---
Severity: Warning
Message: array_pop() expects parameter 1 to be array, null given
Filename: Templates/Afnic.php
Line Number: 128
---
Severity: Warning
Message: array_values() expects parameter 1 to be array, null given
Filename: Templates/Afnic.php
Line Number: 129

.it - hotmail.it
Severity: Warning
Message: strtotime() expects parameter 1 to be string, array given
Filename: Result/Result.php
Line Number: 534
---
Severity: Warning
Message: strtotime() expects parameter 1 to be string, array given
Filename: Result/Result.php
Line Number: 537
---
Severity: Warning
Message: strtotime() expects parameter 1 to be string, array given
Filename: Result/Result.php
Line Number: 534
---
Severity: Warning
Message: strtotime() expects parameter 1 to be string, array given
Filename: Result/Result.php
Line Number: 537

.tk - mailfa.tk
Severity: Notice
Message: Undefined offset: 8
Filename: Templates/Tk.php
Line Number: 91

.ws Domains not being fully parsed

Hi,

I'm currently testing your library for a project and so far it's great. However, I noticed that the following .ws domains I tested don't return all the information contained in the raw data:
website.ws
ebsite.ws
whois.ws
no-spam.ws
trashmail.ws

Is the template not up-to-date here or is there a known issue with different responses for some reason (I only have limited .ws domains in my database, but they all look pretty similar to me - some are missing contacts, but other than that the field layout looks the same)?

Error: Invalid query

Hi, here's my code:

<?php
require_once 'DomainParser/vendor/autoload.php';
require_once 'WhoisParser/vendor/autoload.php';

$Parser = new Novutec\WhoisParser\Parser();

$result = $Parser->lookup("hello.org");

print_r($result);
?>

and every single domain just displayed:

Novutec\WhoisParser\Result\Result Object ( [name:protected] => [idnName:protected] => [status:protected] => [nameserver:protected] => [ips:protected] => [created:protected] => [changed:protected] => [expires:protected] => [registered:protected] => [dnssec:protected] => [whoisserver:protected] => whois.iana.org [contacts:protected] => stdClass Object ( ) [registrar:protected] => [rawdata] => Array ( [0] => % IANA WHOIS server % for more information on IANA, visit http://www.iana.org % % Error: Invalid query ) [network:protected] => [exception:protected] => [parsedContacts:protected] => [template] => Array ( [whois.iana.org] => iana ) )

So how can I solve this problem?

PS: lookup(); IP is working properly.

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.