| |||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | #2 (permalink) |
| Senior Member | The following works for getting whois information:- PHP Code: |
| |
| | #5 (permalink) |
| Senior Member | i used the code and it worked perfectly can u please explain some things to me that i fail to grasp: 1. why are we using Code: $info .= fgets($sock,128); what is the use of Concatenate here? 2. what is 128 in the fget()? thanks |
| |
| | #6 (permalink) |
| Senior Member | 1) The concatenate is used to add the string (fgets($sock,128) to the $info variable (i.e. because then, after the loop's complete, "echo $info" can be used in one go to echo everything). But yes, "$info=fgets($sock,128) . $info" should also do the same thing.2) The 128 is the maximum length of what's returned by the results
__________________ █ Devoted Hosting █ High Quality Shared And Reseller Hosting █ cPanel, 24/7 support, 99.9% uptime guaranteed |
| |
| | #7 (permalink) |
| Senior Member | Yes as tristanperry stated the 128 is the amount of bytes to read at a time. The reason we specify it as the PHP manual specifies that it is more resource efficient to do so (http://php.net/fgets) Regarding the $info .= fgets($sock,128); line it achieves exactly the same as what you wrote but is just another way of doing it. |
| |
| | #9 (permalink) | |
| If only you knew... | Quote:
| |
| |
| | #15 (permalink) | |
| Senior Member | Quote:
| |
| |
| | #16 (permalink) | ||
| Senior Member | Quote:
![]() Quote:
What sort of response are you getting from them when you get an error? | ||
| |
| | #17 (permalink) | |
| Senior Member | here is the error Quote:
| |
| |
| | #21 (permalink) | ||
| Senior Member | Quote:
Quote:
The only possible solutions are as follows:- 1) Find out how many queries you can make in x amount of time and use sleep or usleep to ensure you do not do too many queries. 2) Use more than 1 whois server to find the results. 3) Use a bank of proxies that will help. The best solution is a combination of options 1 and 2. Option 3 should be avoided as it could end up you being permanently banned from using the whois server in question. | ||
| |
| | #22 (permalink) |
| NamePros Regular | Thanks for this tool! Can anybody just tell how to get the available or not status? I mean if the domain is available show XXXX and if not show "YYYY" Thanks!
__________________ Recetas de Cocina (In Spanish) | Perros Pastor Aleman (In Spanish) | Where is my sign??? |
| |
| | #23 (permalink) | |
| Senior Member | Quote:
2. different whois servers is definately a help. i will rotate between those three servers that u mentioned 3. proxies: i think that requires a. more advanced coding which i am not familiar with b. good proxies are hard to find therefore the script will hardly function when any proxy goes down | |
| |
| | #24 (permalink) |
| NamePros Regular | are you running that on your local server ? or on real hosting ? Maybe if its on real hosting (exp. GoDaddy) there are more whois lookups from other machines / ppls trying to register domains etc.
__________________ Patience is your best friend in this business! (© by Gene) |
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |