* @package AgileBill * @version 1.4.93 */ /* ============================================================================ Available Config Variables: ============================================================================ debug (0/1 test/live) mode (0/1 test/live) user password plan_id ============================================================================ */ class plg_reg_NAMES4EVER { function plg_reg_NAMES4EVER ($obj) { $this->registrar = $obj->registrar; $this->domainrs = $obj->domain; $this->domain_name = $obj->domain['domain_name'].'.'.$obj->domain['domain_tld']; $this->domain = $obj->domain['domain_name']; $this->tld = $obj->domain['domain_tld']; $this->term = $obj->domain['domain_term']; if(!empty($obj->server['ns_primary'])) $this->ns1 = $obj->server['ns_primary']; else $this->ns1 = $obj->registrar['ns1']; if(!empty($obj->server['ns_secondary'])) $this->ns2 = $obj->server['ns_secondary']; else $this->ns2 = $obj->registrar['ns2']; if(!empty($obj->server['ns_ip_primary'])) $this->nsip1 = $obj->server['ns_ip_primary']; else $this->nsip1 = $obj->registrar['ns1ip']; if(!empty($obj->server['ns_ip_secondary'])) $this->nsip2 = $obj->server['ns_ip_secondary']; else $this->nsip2 = $obj->registrar['ns2ip']; # get the account details for the registrant: $db = &DB(); $q = "SELECT * FROM ".AGILE_DB_PREFIX."account WHERE id = ".$db->qstr( $this->domainrs['account_id'] )." AND site_id = ".$db->qstr(DEFAULT_SITE); $rs = $db->Execute($q); if ($rs->RecordCount() == 1) { $this->account = $rs->fields; } # get the country code for this account: $q = "SELECT three_code FROM ".AGILE_DB_PREFIX."country WHERE id = ".$db->qstr( $this->account['country_id'] )." AND site_id = ".$db->qstr(DEFAULT_SITE); $rs = $db->Execute($q); if ($rs->RecordCount() == 1) { $this->country = $rs->fields['three_code']; } } ###################### ### Register domain ###################### function register() { global $VAR; $VAR['test']=1; # generate the xml string $xml_request = '?'. ''. 'secret'. $this->registrar['password'] .''. ''. $this->registrar['plan_id'] .''. ''. ''. ''. $this->account['password'] .''. ''. $this->account['company'] .''. ''. ''. $this->nsip1 .''. ''. ''. ''. $this->nsip2 .''. ''. ''. ''. $this->account['first_name'] .'e'. ''. $this->account['last_name'] .''. ''. $this->account['company'] .''. '
'. ''. $this->account['address1'] .''. ''. $this->account['city'] .''. ''. $this->account['state'] .''. ''. $this->account['zip'] .''. ''. $this->country .''. '
'. '+1 (888) 555-1212'. ''. $this->account['email'] .''. '
'. ''.$this->term .''. '
'. '
'; # Test mode: if($this->registrar['mode'] == 1) $this->url = '/PirinLink/Pirin.exe'; else $this->url = '/PirinLink/PirinTest.exe'; # Create the SSL connection & get response from the gateway: include_once (PATH_CORE . 'ssl.inc.php'); $n = new CORE_ssl; $response = $n->connect('names4ever.com', $this->url, $xml_request, true, 1); # debug #if($this->registrar['debug'] == 1) #echo ""; if(eregi('', $response)) return TRUE; else return FALSE; } ### Renew domain function renew() { return false; } ### Transfer domain function transfer() { return false; } ### Park domain function park() { return false; } } ?>