Jump to content

Custom whois page doesn't display domains


Dimitra

Recommended Posts

Hi,

I need some help with a custom page I have created.

 

I have created a new custom page named whois (created with whoislookup.tpl and whoislookup.php), where I have put the code for the bulk search from bulkdomainchecker.tpl. The page is actually a copy of bulkdomaintransfer.tpl, but with different name and php file. I want to use it as a whois search, so the client searches for a registered domain and the results display the domain with the WHOIs button.

 

My problem is that I can't make the page display any domain information. I have tried to include files from the feeds folder but nothing. Every element related to domain (domain results, pricing table etc) is empty.

 

How can I make it work and display the results in this page? Any help would be appreciated.

 

Thank you.

Link to comment
Share on other sites

I need some help with a custom page I have created.

I have created a new custom page named whois (created with whoislookup.tpl and whoislookup.php), where I have put the code for the bulk search from bulkdomainchecker.tpl. The page is actually a copy of bulkdomaintransfer.tpl, but with different name and php file. I want to use it as a whois search, so the client searches for a registered domain and the results display the domain with the WHOIS button.

it would probably have been easier to modify one of the existing bulk templates to do this, rather than try to move it to a separate page.

 

My problem is that I can't make the page display any domain information. I have tried to include files from the feeds folder but nothing. Every element related to domain (domain results, pricing table etc) is empty.

I suspect that domainchecker.php uses calls to numerous function files that create the required arrays - whoisfunctions.php and domainfunctions.php are probably two, but there well may be others... plus there may be additional code within domainchecker.php that is essential to reproduce a working whois page.

 

How can I make it work and display the results in this page?

you'd probably have to adapt the code within whoislookup.php to be similar to domainchecker.php - but as domainchecker.php is encrypted, that won't be straightforward! :)

 

also, it's worth noting that the bulk register/transfer options have been removed from v7 (in fact, so has domainchecker effectively - everything is now done in the cart) - so even if you could get this to work in v6, they'd be no guarantees that it would continue to work in v7.

 

http://docs.whmcs.com/Version_7.0_Release_Notes

 

The bulk domain check and bulk domain transfer facilities within the client area have been removed in 7.0.

 

you could tweak one of the new v7 templates to show a whois button for unavailable domains - but because of how v7 now searches, even that basic step isn't quite so simple to ensure it always works! :roll:

 

JXk6qrW.png

always remember that on v6 and v7, you can always use the URL below to lookup a domain (e.g whmcs.com)...

 

whois.php?domain=whmcs.com

if it's registered, it will output the whois result; if it's available, it will output "*domain* is available!"

 

that could be used as a starting point for a whois lookup page - the code below should work on any page (as long as the path to whois.php is correct)...

 

<form class="form-horizontal" id="whois" action="whois.php">
<div class="form-group">
 <label class="col-md-4 control-label" for="domain">Domain</label>  
 <div class="col-md-4"><input id="domain" name="domain" placeholder="enter your domain name" class="form-control input-md" required="" type="text"></div>
 <div class="col-md-4"><button id="whois" name="whois" class="btn btn-primary">WHOIS Lookup</button>
 </div>
</div>
</form>

 

8Hw9mpg.png

 

or if you wanted to throw the output into a popup window... :)

 

<script>
$(document).ready(function() {
   $('#whois').submit(function() {
       window.open('', 'whoispopup', 'width=500,height=400,resizeable,scrollbars');
       this.target = 'whoispopup';
   });
});
</script>
<form class="form-horizontal" id="whois" action="whois.php">
<div class="form-group">
 <label class="col-md-4 control-label" for="domain">Domain</label>  
 <div class="col-md-4"><input id="domain" name="domain" placeholder="enter your domain name" class="form-control input-md" required="" type="text"></div>
 <div class="col-md-4"><button id="whois" name="whois" class="btn btn-primary">WHOIS Lookup</button>
 </div>
</div>
</form>

as I say, this is just a starting point... you'd ideally add some validation in there, e.g to prevent someone just entering 'whmcs' or whmcs.c' etc... perhaps also captcha to make sure the lookup service isn't abused or taking you over whois lookup limits... that's important because if you go over lookup limits, you might start getting incorrect responses in the cart (and potentially lose sales). :roll:

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated