How does this work? Brief name selection form question.
New here? Learn about Bountify and follow @bountify to get notified of new bounties! x

There is a nice orange form to "Search for your Domain Name" at the page here:

https://neilpatel.com/how-to-start-a-blog/

Here is a pic of the FORM at the above link:

https://i.imgur.com/snSC9rZ.jpg

And here is a pic to locate the form on the long webpage:

https://i.imgur.com/kbydejM.jpg

Can someone tell me what API this is using? And where this form comes from?
Have you seen a similar form anywhere?

I want to add this form to my website. So how do I do that?

Note: You could perhaps use WireShark and see who the form is communicating with.

when i go to that page i dont see the form yu have on the image above...
mashtullah 28 days ago
its way down, below the YouTube video. https://i.imgur.com/kbydejM.jpg
tonloc 28 days ago
awarded to mashtullah
Tags
ajax

Crowdsource coding tasks.

2 Solutions


This is an ajax request...
That form submits the data to an internal script(https://neilpatel.com/wp-admin/admin-ajax.php) on the same website. That script returns html code which is rendered via jquery on the same div to create the results pane
here is what is returned
<p class="info-taken">Looks like hjj.com is taken. It wasn't that good anyway. Here are some better suggestions:</p>
<ul class="info-list"><li><a rel="nofollow" target="_blank" href="https://www.bluehost.com/track/npatel/NPWidget?page=/web-hosting/signup&domain=hjjonline.com&cpanel_plan=starter">hjjonline.com</a></li><li>
<a rel="nofollow" target="_blank" href="https://www.bluehost.com/track/npatel/NPWidget?page=/web-hosting/signup&domain=hjj.club&cpanel_plan=starter">hjj.club</a></li><li>
<a rel="nofollow" target="_blank" href="https://www.bluehost.com/track/npatel/NPWidget?page=/web-hosting/signup&domain=my-hjj.com&cpanel_plan=starter">my-hjj.com</a></li><li> <a rel="nofollow" target="_blank" href="https://www.bluehost.com/track/npatel/NPWidget?page=/web-hosting/signup&domain=hjj-online.com&cpanel_plan=starter">hjj-online.com</a></li><li>
<a rel="nofollow" target="_blank" href="https://www.bluehost.com/track/npatel/NPWidget?page=/web-hosting/signup&domain=myhjj.net&cpanel_plan=starter">myhjj.net</a></li><li>
<a rel="nofollow" target="_blank" href="https://www.bluehost.com/track/npatel/NPWidget?page=/web-hosting/signup&domain=thehjj.com&cpanel_plan=starter">thehjj.com</a></li><li>
<a rel="nofollow" target="_blank" href="https://www.bluehost.com/track/npatel/NPWidget?page=/web-hosting/signup&domain=myhjj.co&cpanel_plan=starter">myhjj.co</a></li><li>
<a rel="nofollow" target="_blank" href="https://www.bluehost.com/track/npatel/NPWidget?page=/web-hosting/signup&domain=myhjj.online&cpanel_plan=starter">myhjj.online</a></li><li>
<a rel="nofollow" target="_blank" href="https://www.bluehost.com/track/npatel/NPWidget?page=/web-hosting/signup&domain=hjjonline.net&cpanel_plan=starter">hjjonline.net</a></li><li>
<a rel="nofollow" target="_blank" href="https://www.bluehost.com/track/npatel/NPWidget?page=/web-hosting/signup&domain=myhjj.info&cpanel_plan=starter">myhjj.info</a></li><li>
<a rel="nofollow" target="_blank" href="https://www.bluehost.com/track/npatel/NPWidget?page=/web-hosting/signup&domain=hjjonline.org&cpanel_plan=starter">hjjonline.org</a></li><li>
<a rel="nofollow" target="_blank" href="https://www.bluehost.com/track/npatel/NPWidget?page=/web-hosting/signup&domain=myhjj.biz&cpanel_plan=starter">myhjj.biz</a></li><li>
<a rel="nofollow" target="_blank" href="https://www.bluehost.com/track/npatel/NPWidget?page=/web-hosting/signup&domain=myhjjonline.com&cpanel_plan=starter">myhjjonline.com</a></li><li>
<a rel="nofollow" target="_blank" href="https://www.bluehost.com/track/npatel/NPWidget?page=/web-hosting/signup&domain=hjjonline.co&cpanel_plan=starter">hjjonline.co</a></li></ul>

If the domain supplied is available this is the response
<p class="info-success">It's your lucky day. sampledomain-erp.com
<a rel="nofollow" target="_blank" href="https://www.bluehost.com/track/npatel/NPWidget?page=/web-hosting/signup&domain=ngs-erp.com&cpanel_plan=starter">is available right now</a>.
No guarantees it'll still be available in 5 minutes.</p>

Now, under the hood, the script checks for domain availability on bluehost.com, bluehost have an affiliate marketing program and i think they offer you an API to perform a whois on domains.

About this being possible to be added on your website? Absolutely YES it can be added on your website as it is!
Let me know if you need any help.

Let me know incase you need any more information or there is somewhere i have not elaborated well
mashtullah 28 days ago
Cool thanks. Yes I think that Bluehost will "offer you an API to perform a whois." But where? I have searched but can't find anything. Yes if you can find something from BlueHost, or from a different party, I would be interested in putting this on my site.
tonloc 28 days ago
let me get you the info
mashtullah 28 days ago
@tonloc you have to join their affiliate program(https://www.bluehost.com/affiliates) first then you will be able to get an API for your domain. The API is not for anyone thats why you cannot find it on their website by just looking. They pay you for every signup from your domain so thats why its locked for members only. Joining the affiliate program is free. Sign up from the url(https://www.bluehost.com/affiliates) after you have done so let me know so that i can help you with the adding this form on your website incase you get any hitches.
mashtullah 28 days ago
Yes i have an account. They will give you a widget when you signup. You can see a simple of the BlueHost widget here http://www.allbloggerbuzz.com/2015/08/how-to-make-money-from-bluehost-affiliate-program.html but it appears that NeilPatel has coded his own version. Because the bluehost one doesnt have ajax etc... Maybe i'll have to code my own ;(
tonloc 28 days ago
I'm not good at APIs. But maybe this is something: https://www.quora.com/Is-there-any-API-available-for-BlueHost
tonloc 28 days ago

The form submits data to the same web site. This is most likely a custom WordPress plugin that sends requests to a third-party Domain search API.

You can achieve the same thing using GoDaddy's Domains API (https://developer.godaddy.com/doc#!/_v1_domains) and WordPress' HTTP API (https://codex.wordpress.org/HTTP_API).

View Timeline