How to use API in HTML form

hello, I am building a new website for my web design business and am making a page that offers hosting and registration services. I would like to include a form that links directly to dreamhosts domain registration page so that visitors can check availability and if they choose register directly with Dreamhost. It would be nice if the form I create enabled the visitor to enter the name directly into the form and have the result open the dreamhost page in a new window.

I was told by Tech support that I should handle this with the API, but I really don’t understand how to use the API in an HTML form. I have a key and I set it up with what seemed like the appropriate cmd (domain-registration_available), but what do I do from there?

Using the API will allow anyone who can view the HTML form to make you register a domain, on your account. That’s a really bad idea, for all sorts of reasons. Don’t do it. (In general, API calls should never be made from the web browser — they should be made from your scripts.)

If you want to send people to DreamHost’s signup page, just link them to Simple as that.

Thank you for pointing that out. I guess that is how I will do it. I just thought it would be cool to link to and some how have the results of the form render the results on that page. I was able to do it with the whois page, by doing this:

Domain Name:


but when I try a similar thing with the domreg page, the form has to be completed again when the DH page opens.

Not a big deal, I just thought it would be cool.