How do i perform following with this particular API?

Form is setup in PHP for registered user to go in domain title On submit..

Check if domain can be obtained >

  • If NO > output to XML > run the loop again in five minutes
  • If So > output to XML > proceed and purchase (register) the domain > finish loop


Sample API code

<?php /**  * Set the API URL  */ $sApiUrl = "https://world wide"

/**  * Set Publish Parameters  */ $aParams = Array(

            'uid'     => "--USERNAME--",    // Username

            'pw'      => "--APIKEY--",      // API Key

            'command' => "querydomain",     // Command to Rum

            'sld'     => "sampledomain",    // Primary area of the Domain

            'tld'     => "com")         // Domain Extension

/**  * Run the cURL command  */

$oCurl = curl_init() curl_setopt($oCurl, CURLOPT_URL, $sApiUrl)

curl_setopt($oCurl, CURLOPT_Publish, 1)

curl_setopt($oCurl, CURLOPT_POSTFIELDS, $aParams)

curl_setopt($oCurl, CURLOPT_RETURNTRANSFER, true)

curl_setopt($oCurl, CURLOPT_SSL_VERIFYPEER, false)

$sResponse = curl_professional($oCurl) curl_close($oCurl)

/**  * Turn results into Simple XML Object  */

$oOutput = new SimpleXmlElement($sResponse)

/**  * Debugging output, therefore we can easily see what we should got  */



API Instructions

check Inspections whether a website title can be obtained for registration.

purchase Registers a brand new domain title.

transfer Demands a website transfer to registrar.

extend Stretches (renews) domain registration.

changepassword Changes the domain password.

sendpassword Send domain password to domain owner.

contacts Changes domain names contacts.

querydomain Returns more information concerning the domain.

sendepp Transmits gTLD epp answer to domain owner.

refillaccount Refills your merchant account with funds.

changedomainns Changes domain names title servers.

sendtransferemail Transmits transfer authorisation request to domain owner.

addchildns Add child title server to domain.

updatechildns Update particulars for child title server.

removechildns Remove child title server from domain.

pushdomain Push domain to a different registrar merchant.

getdnsrecords Get domain title server records for any domain.

enablednsdomain Create DNS domain service for domain.

adddnsrecord Add new DNS record to domain.

updatednsrecord Update DNS record for any domain.

removednsrecord Remove DNS record from the domain.

updatednssoa Update DNS SOA record for any domain.

disablednsdomain Destroy DNS domain service for any domain.

getmailrecords Get mail sending records for any domain.

addmailforwarder Give a mail forwarder to some domain.

removemailforwarder Remove a mail forwarder from the domain.

updatemailforwarder Update the particulars of the Mail Forwarder for any domain.

geturlrecords Get URL Sending records for any domain.

addurlforwarder Give a URL Sending record to some domain.

updateurlforwarder Update a URL Sending record for any domain.

removeurlforwarder Remove a URL Sending record for any domain.

getreglock Get registry lock particulars for any domain.

setreglock Set a registry lock for any domain.

updatecontact Update a previous address book entry.

getapiinfo Get details about the Domain System API.

transferout Push a website title to a different registrar, given their tag.

Outputted XML from example above

SimpleXMLElement Object

( [results] => SimpleXMLElement Object ( )

[errors] => SimpleXMLElement Object


        [error] => SimpleXMLElement Object


                [domain] => SimpleXMLElement Object


                        [title] =>

                        [status] => SimpleXMLElement Object


                                [code] => 211

                                [text] => Not available

                                [description] => The domain title you queried continues to be registered through another registrar.





[errorcount] => 1

[exectime] => .399 second(s)

[enviroment] => live

[version] => 2.3.9 beta


I can tell what it's you are attempting to complete. However which part particularly are you currently getting difficulties with? It appears as if you will find the API already. Isn't it functioning properly?

Do you want assist in writing the PHP to complete your 'Yes'/'No' step-above?

And the reason for "checking again in five minutes"? I'm able to answer your query, just need some a lot of where you stand stuck.

Regards Luke Billings