Displaying the Latest Registration Agreement


As a reseller it is important to have an updated registration agreement as stated in your reseller agreement.

We have made this task easier than ever and much less time-consuming with the introduction of the API command - GETAGREEMENTPAGE. Below we have provided a description of this command, as well as examples.

"GETAGREEMENTPAGE"

The "GETAGREEMENTPAGE" API command returns the most recent legal agreements, in formatted HTML. Any instance of "eNom" in the agreement is automatically replaced by your own company name, based on the username and password used to call the command. Because of this, it is important that you use your own reseller username and password to call this command, and NOT that of the user currently logged into your web site.

QUERY STRING AND PARAMETERS

Build the query string using the normal syntax:

/interface.asp?command=GETAGREEMENTPAGE&uid=yourlogin&pw=password
Input Parameters

This command requires only two parameters in addition to the command name: your login ID (uid) and password (pw). The login ID is used to determine the company name inserted in place of "eNom" throughout the agreement. You may also include the optional responsetype parameter, as described in the API Command Catalog.

Returned Parameters and Values

content - The content parameter contains the content of the HTML formatted registration agreement.

ASP SAMPLE CODE

<%
Dim Enom
Dim source
Dim xmlDoc
Dim sourceFile
Dim objLst1

Set Enom = Server.CreateObject( "Enom.EnomURL" )
Enom.NewTransaction

' Set account username and password
Enom.Uid = Application( "Username" )
Enom.Password = Application( "Password" )

Function LoadValidXML (xmlDoc, xmlContent, xmlDescription, flagRedirectOnError)
      Dim bValid
      xmlDoc.async = False
      bValid = xmlDoc.loadXml(xmlContent)
      If Not bValid Then
            If flagRedirectOnError Then
                 Response.Response("Error!")
            End If
      End If
      LoadValidXML = bValid
End Function

' setting up the connection
Set source = Server.CreateObject("MSXML2.ServerXMLHTTP")
requestString = "http://reseller.enom.com/interface.asp?command=getagreementpage&UID=" & Application( "Username" ) & "&PW=" & _
Application( "Password" ) & "&ResponseType=xml"

source.Open "GET", requestString , False
source.Send

Set xmlDoc = Server.CreateObject("MSXML2.DOMDocument")
LoadValidXML xmlDoc, source.responseText, "getagreementpage: " & sourceFile, True

' Find items in the xml
Set objLst1 = xmlDoc.getElementsByTagName("content")

Response.write("<center><h2>Agreement Page</h2></center>")
' Below is how to display entire list of the agreement page. You could modify the font using css, but you could not modify the content
Response.write(objLst1.item(0).text)
%>

PERL SAMPLE CODE

#!/usr/bin/perl

use CGI::Carp qw(fatalsToBrowser);
require LWP::UserAgent;
$ua = LWP::UserAgent->new;

$username = "Username";
$password = "Password";

$Enom_agreement = "http://reseller.enom.com/interface.asp?command=getagreementpage&UID=$username&pw=$password";

$response = $ua->get($Enom_agreement);
$result = $response->content;

@results = split(/\n/,$result);

foreach $_ (@results) {
   if ($_ =~ /^content=/) {
      (undef,$content) = split(/=/,$_);
      last;
   }
}

$content =~ tr/+/ /;
$content =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;

$content = qq~<center><h2>Agreement Page</h2></center>~ . $content;

print("Content-Type: text/html\n\n");
print <<EndOfHTML;

$content

EndOfHTML

exit;
  is an affiliate of   Tucows, a leading domain name services company.
Copyright © 1998-2025 Enom LLC. All rights reserved. Terms & Conditions | Privacy Policy | Abuse Policy