Welcome Guest, Not a member yet? Register   Sign In
Domain Whois Library
#1

[eluser]Glazz[/eluser]
Domain Whois Library

This library is used to see if a domain is available or not for registry and if is not available it returns the whois information, it checks if the domain is valid or not.


How to install:
Quote:1º Copy both files to your application/libraries folder
2º You can autoload the library or manually load it.


How to use (manually loading):
Code:
$this->load->library('domain');

// get domain information.
$info = $this->domain->check('your-domain-here.com');

It returns the data in an array, containing a code, message and if the domain is not available to register it returns the whois information.

List Codes:
Quote:0 - Error
1 - Success, the domain is available for register.
2 - The domain is registered so we have a whois entry in the returned array.
#2

[eluser]surfweb[/eluser]
Hello.

Your library is very interesting. I tried to use it but the screen printing: array

Could you help me?

Sorry for my bad English but not speak it very well
#3

[eluser]Glazz[/eluser]
Hi,

Yes, the return is always an array.

Try using print_r($info) to see what is being returned.

In my first post there is a list of codes, using that code you can see if the domain is available, not available or if we have an error.
#4

[eluser]surfweb[/eluser]
Thank you for your quick response.

Could you give an example because I do not understand how they can use this library.

I do not know where am I wrong!
#5

[eluser]Glazz[/eluser]
I believe you have installed the library correctly so you need to load the library, you can do this but manually loading or autoloading it, you choose.

After that, you go to your controller and post something like this:
Code:
$info = $this->whois->check('example_domain.com');

echo '<pre>';
print_r($info);
echo '</pre>';

It will print the contents of the array.

This is just for printing the data to see if it is working, to use the data you do something like:
Code:
echo $info['whois'];
This will echo / print the whois information of a domain that is registered.
#6

[eluser]surfweb[/eluser]
Now it works correctly. I forgot to add a given inside the parentheses!

If I make a request .eu domain I always returns the value 2

I tried with multiple domains, but the result does not change.

What is the error?
#7

[eluser]Glazz[/eluser]
you need to create multiple $info = $this->whois->check('example_domain.com'); for each domain like so:

Code:
$domain1 = $this->whois->check('example_domain1.com');
$domain2 = $this->whois->check('example_domain2.com');
and so on..
#8

[eluser]surfweb[/eluser]
maybe you did not understand:

. eu domains I always return only the value 2
#9

[eluser]surfweb[/eluser]
I think I found the error:

change this string in the file Whois.servers.php: .eu|whois.eu|FREE with .eu|whois.eu|AVAILABLE
#10

[eluser]Zourite[/eluser]
Hi,

I try add server " .re|whois.nic.re|No entries found " but when i modify the file whois.servers.php an error is generated " Undefined offset: 1 ". I remove the line but don't change ???

Can you help me please ?

Ps : I'm french Smile




Theme © iAndrew 2016 - Forum software by © MyBB