Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

don't make two querys #28

Open
ptopenweb opened this issue Jan 27, 2015 · 1 comment
Open

don't make two querys #28

ptopenweb opened this issue Jan 27, 2015 · 1 comment

Comments

@ptopenweb
Copy link

if you use "$whois_string = $this->info();" inside the isAvailable() function you are querying the whois server two times.

(example on the first page)
$whois_answer = $domain->info(); //FIRST QUERY
...
if ($domain->isAvailable()) { //SECOND QUERY

Some whois servers have limits of 1 host from one ip each second (for instance).
So you should only ask only one time.
You can for instance save the domain info in a class variable and use it, if already exists

NabiKAZ added a commit to NabiKAZ/php-whois that referenced this issue Mar 11, 2015
@NabiKAZ
Copy link

NabiKAZ commented Mar 11, 2015

I fixed this bug.
After accept pull request you can test it or you can get fork from here: https://github.com/NabiKAZ/php-whois/

shapito27 added a commit to shapito27/php-whois that referenced this issue Oct 24, 2020
shapito27 added a commit to shapito27/php-whois that referenced this issue Oct 24, 2020
shapito27 added a commit to shapito27/php-whois that referenced this issue Oct 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants