Results 1 to 11 of 11

Thread: enom api

  1. #1

    enom api

    I am starting to code the enom API in PHP.

    How would i send variables to enom and retrieve the response? If i use the form method wouldn't it just forward to http://resellertest.enom.com ?

    Would i use the form in first place? Anyone have any sample codes? I have read the enom documentation but still dont completely understand it. It doesnt have any sample PHP documentation, or how i post the vars to their website.

  2. #2
    Join Date
    Jun 2004
    Location
    Woodinville Washington US
    Posts
    613
    Check out the enom sample scipts - they have one in php language.

    You would then use the $Enom->Values['value'] to parse the response, and the

    Code:
    $Enom = new ceInterface; (I think thats it, may be mispelled)
    $Enom ->newrequest();
    $Enom->AddParam( "EnomParamName", $value );
    $Enom->DoTransaction();
    
    $value1 = $Enom->Values['value1'];
    And so on. Enom has a new PHP sample script that will integrate its own shopping cart, mysql database, paypal, authorize.net, worlpay and more comming out in the second week of july. May want to just wait for that and save yourself a month of work

  3. #3
    Could you give me the website address you retrieved this information from please? Or is it all on enom website?

    If it's on the enom website what documentation is it?

  4. #4
    Code:
    $enom = new cEnomInterface;
    $enom->newrequest();
    $enom->AddParam("uid","username");
    $enom->AddParam("pw","password");
    $enom->AddParam("sld","domain");
    $enom->AddParam("tld","com");
    $enom->DoTransaction();
    
    echo $enom->Values['Done'];
    It seems pretty straight forward when i look at it. I just saw the enominterface class. I understand it now once i read the code.

    From the above code it would register a domain and retrieve true or false right? Obviously whois details will need to be parsed too.

  5. #5
    Join Date
    Jun 2004
    Location
    Woodinville Washington US
    Posts
    613
    You would also need the command to be sent as well.

    Check out teh RegisterName.php page that came with it - it has a method to specify the registrant, and some other details before hand - and also shows you how it checks the registration process by looking at the following:

    Code:
    if($Enom->Values['ErrorCount'] != 1){ 
       //There was an error
       echo $Enom->Values['Err1];
       } else {
      There was no error - do something else
         $rrpcode = $Enom->Values['RRPCode'];
          if($rrpcode == '200'){
                 Registration was succesfull, do something here
            } elseif($rrpcode == '1300'){
                 Command was sent to the registry (non real time tlds)
            } elseif( And so on . . . .

  6. #6
    I take a look at the documentation also for rrpcodes. Seems interesting.

    Would i do this before domain has been paid for, or after? Because what if the registration wasn't successful? On AWBS it has a 'run' command in the control panel to re-run the query. Do you know how that is done?

  7. #7
    One more thing though, what about whois data? How would i send them? The customer wont be registering for enom but under the websites database. So how will i assign whois information under their domain?

  8. #8
    Join Date
    Jul 2003
    Location
    Kuwait
    Posts
    5,104
    One more thing though, what about whois data? How would i send them? The customer wont be registering for enom but under the websites database. So how will i assign whois information under their domain?
    All this information is available in the enom api documentation. I didn't know that they were coming out with a PHP class. I wrote my own for in-house use.

    Its good though, I can compare mine with theirs

  9. #9
    It has information on parsing whois data for domains? Let me see...

  10. #10
    Join Date
    Jun 2004
    Location
    Woodinville Washington US
    Posts
    613
    Yes, it does have that. I dont remember the file off hand.

    Drams (AWBS) does it because it stores in a datatbase - the enom one that you have does not do that. Enom has built one with databases and third party merchants like authorize.net, worldpay, paypal, etc. but its not quite out yet. Will be a few more weeks.

    Check out the RegisterName.php - that file does everything that you need it to do, and its all there.

  11. #11
    Thank you. I will see.

    //added: My aim is also to have my own database and store all the information in there.
    Last edited by Gold1234; 07-03-2005 at 01:24 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •