NULL instead of domainname in CustomWhois::whois

Started by peter-bill, July 22, 2013, 02:28:02 PM

peter-bill

Hello!
I'm new in HostBill
And I try to implement a custom whois function.
I follow the instruction by the link below:
http://wiki.hostbillapp.com/index.php?title=Custom_domain_availability_check

And I have issue with function whois, hostbill calls it without any params! O_O
No domainname, just null.

Thanks for help!

sysbitnet

Hello good people,


I have the same problem, and I can not solve. Develop at the address is the same code, but when applied, then all domains are becoming available although officially registered.


Does anyone managed to solve this problem ?
If you want something to change your the better, start you thinking about how to do it . . .

blackrider

Quote from: systemn on September 15, 2013, 04:20:43 AM
Hello good people,


I have the same problem, and I can not solve. Develop at the address is the same code, but when applied, then all domains are becoming available although officially registered.


Does anyone managed to solve this problem ?

Please post the code that you added in whois file so i can help.
Atsoglou Michail - Innovative Web Services, iData  TEL: +30274550231 (GR) | +306977931942 (Mobile)

sysbitnet

#3
Quote from: blackrider on September 15, 2013, 09:42:52 AM
Please post the code that you added in whois file so i can help.

Hello blackrider,

in particular that you think ?


I followed as written on the official develop zone


Creating custom domain availability check script
https://dev.hostbillapp.com/additional-resources/creating-custom-domain-availability-check-script/


In HostBill its possible to use custom domain check script, instead of default lookup method. This is useful if you wish to use your registrar domain availability service. To implement custom domain check:

1. Create file class.customwhois.php in /includes/core dir of your HostBill

2. Update file body:

<?php
/* 
    This is sample class to perform custom domain checks.
    It replaces standard HostBill domain availability check method.
 */
class CustomWhois {


    
/*
     * This method should return true if domain is available to register, false otherwise
     */
    
public static function is_available($domainname) {
        
//perform your domain availability check here
        
return true;
    }


    
/*
     * This method should return whois information
     */
    
public static function whois($domainname) {
        
//pull or generate domain whois information here
        
return 'whois information';
    }
}
?>





And Editing / adding WHOIS servers for TLD availability check
https://dev.hostbillapp.com/additional-resources/editing-adding-whois-servers-for-domain-check/


HostBill use WHOIS servers (most of them works over port 43) to check domain availability.

If you need to add some custom servers or edit current list you can find them in /includes/extend/whois/whois.php Array $servers this file contains list of tlds and related whois servers.


Example:


$servers = array(
     '.com' => Array
        (
        'server' => 'whois.crsnic.net',
        'available' => 'No match for'
    )
//....//
);


Array element above informs HostBill core that:


1. if domain to lookup have .com extension than:
connect with whois.nic.co over port 43
provide domain to lookup
check response, if it will contain string "No match for:" (as described in 'available' section) it means that domain is available for registration
2. If 'server' part begin with http:// HostBill will perform lookup using port 80 (http request)

I add in whois.php


    '.rs' => array(
        'server' => 'whois.rnids.rs',
        'available' => 'Not Registered',
    ),




But not work, if i request domain available i get status Available! Order Now.If domain Unavailable! or although it is actually free. When i remove class.customwhois.php or disable i see for .rs domain Unavailable! if domain is not register .

Did you have idea ?
If you want something to change your the better, start you thinking about how to do it . . .

sysbitnet

If you want something to change your the better, start you thinking about how to do it . . .

sysbitnet

If you want something to change your the better, start you thinking about how to do it . . .

sysbitnet



Since I could not find a solution, I opened a ticket in the section for reporting bugs.


https://help.hostbillapp.com/index.php?/bugtracker/bug/&id=813


If you have free time vote to Kris decided to correct fix this bug problem


Thank you,
SystemN
If you want something to change your the better, start you thinking about how to do it . . .