Don’t worry, this is actually much easier than it appears! To complete the integration, your form will need to post 4 fields to the domainchecker.php in WHMCS.
We’ll take this step by step, so that you can make it work with any form.
First thing you’ll need to do is grab the integration code from WHMCS. You can get this from the Utilities -> Integration Code menu option. Get the value of the “token” field and hold on to it.
Next thing we need to do is add our fields one by one to your form. Also, keep in mind that your form must use the POST method, like so:
<form ... method="post" ... >
We also need to set the “action” attribute of the form to the URL that WHMCS gave you in the form tag in its integration code. This tells the form what URL to post its data to when you hit submit.
<form ... action="http://domain.com/whmcs/domainchecker.php" ... >
Now let’s add the two hidden fields to the form, where TOKEN is the value of the token field from the integration code you got from WHMCS.
<form ... > ... <input type="hidden" name="token" value="TOKEN" /> <input type="hidden" name="direct" value="true" /> ... </form>
All that’s left is to match the other two field’s names. Make sure that the name attribute of your domain field is set to “domain” and the name attribute of your TLD (.com, .net, .org) field is set to “ext”. It’s also recommended that when posting a TLD, you should include the dot prefix, as in “.com” or “.co.uk”.
<form ... > ... <input type="hidden" name="token" value="TOKEN" /> <input type="hidden" name="direct" value="true" /> <input ... name="domain" ... /> <select ... name="ext" ... > ... </select> ... </form>
That should be it! If you experience any issues, double check that you’re using the correct names for your fields.