Announcement

Collapse
No announcement yet.

How to setup API to GET TLD info?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to setup API to GET TLD info?

    Hello everyone,
    I am new to API programming, I have been trying to understand how to "GET" and to "HOST" and to "REQUEST" info for all of TLD domains.

    For example, I am about to setup my web in full HTML 5 transitional compatible for all of the browsers, and I would like to change how to search for the domain names in search box, but I am not able to understand how to connect to the RSP Database.

    https://cp.resellerspanel.com/tools/api-docs/ isn't a much of help on how to (WRITE) to make it to (WORK) on my website.
    All right.

    Let's begin at the beginning.

    I wanted to add a search box without using resellers tools to use their ready made search domain form.

    My point is that I wanted to programming API to get domain name and have that added on the webpage as simple as it is.

    HOW DO YOU CALL? WITH API? I am really lost! Please HELP! Clear that up for me PLEASE pre made scripts and ready to use with an additional of modification to my liking.

    PLEASE HELP!

  • #2
    I'm not sure what your question is exactly. To get a list of all the domains offered by your store you can use, where username is your store name and auth_password is your store password.

    Code:
    https://api.duoservers.com/?auth_username=username&auth_password=password&section=domains&command=info
    Personally I would cache this information locally as it does not change very often.

    To check a domain for availability you can use this

    Code:
    https://api.duoservers.com/?auth_username=username&auth_password=password&section=domains&command=check&name=customers-chosen_domain&tlds[0]=com
    You capture the domain the customer wants and pass it to the name parameter and then pass the TLD to the tlds[0] array. Note you can search for multiple TLD by using an array tlds[0]..tlds[n]

    So to give you an example I want the domain clivejo and want to search for .eu, co.uk and .com

    Code:
    https://api.duoservers.com/?auth_username=username&auth_password=password&section=domains&command=check&name=clivejo&tlds[0]=eu&tlds[1]=co.uk&tlds[2]=com
    You then parse the result which will look like the following, this means .eu and .co.uk are available but .com is registered.

    Code:
     <ampa>
         <command>0</command>
         <error_code>0</error_code>
         <domain>clivejo</domain>
         <count>3</count>
         <result>
               <eu>0</eu>
               <co.uk>0</co.uk>
               <com>1</com>
         </result>
         <execution_time>1.487 s</execution_time>
         <db_time>0.007 s</db_time>
         <uniq_id>5075007179</uniq_id>
         <ttl>0</ttl>
    </ampa>
    You can test this out directly in your web browser, just paste in the URL (with the correct store name and password) and the API will return the result. Remember to "View the Source" to see the full tags.

    Last edited by clivejo; 14-07-2015, 12:40 PM.

    Comment


    • #3
      Great sharing

      Comment

      Working...
      X