function systran($text, $lang) { $systran_id = "SystranSoft-en"; $systran_charset = "ISO-8859-1"; $host = 'systranbox.com'; $form = '/systran/box'; $pass = array('systran_id' => $systran_id, 'systran_charset' => $systran_charset, 'systran_lp' => $lang, 'systran_text' => $text); // CREATE THE RECORD require_once PATH_CORE . 'post.inc.php'; $post = new CORE_post(); $result = $post->post_data($host, $form, $pass); $pat = "\n"; $arr = split($pat, $result); $ret = ''; for ($i = 0; $i < count($arr); $i++) { if ($i > 5) { $ret .= $arr[$i]; } } return $ret; }
function register() { # Compose the data to post: $url = '/interface.asp'; $vars = array('Command' => 'Purchase', 'UID' => $this->registrar['enom_user'], 'PW' => $this->registrar['enom_pass'], 'SLD' => $this->domain, 'TLD' => $this->tld, 'NS1' => $this->ns1, 'NS2' => $this->ns2, 'RegistrantFirstName' => $this->account['first_name'], 'RegistrantLastName' => $this->account['last_name'], 'RegistrantAddress1' => $this->account['address1'], 'RegistrantCity' => $this->account['city'], 'RegistrantStateProvince' => $this->account['state'], 'RegistrantPostalCode' => $this->account['zip'], 'RegistrantEmailAddress' => $this->account['email'], 'RegistrantPhone' => '0-000-000-000', 'RegistrantFax' => '0-000-000-000', 'RegistrantNexus' => 'na', 'RegistrantPurpose' => 'non', 'UnLockRegistrar' => '0', 'NumYears' => $this->term, 'ResponseType' => 'HTML'); # For .co.uk TLDs $tld = strtolower($this->tld); if ($tld == 'co.uk') { $vars['uk_legal_type'] = 'OTHER'; $vars['uk_reg_co_no'] = 'NA'; } # Do the post include_once PATH_CORE . 'post.inc.php'; $post = new CORE_post(); $result = $post->post_data($this->host, $url, $vars); # Debug if ($this->registrar['debug']) { echo "<BR><u>Result:</u> {$result}\t<BR>"; } # Get results if (eregi("Command completed successfully", $result)) { return TRUE; } else { return FALSE; } }
function register() { if ($this->registrar['mode'] == 1) { $SERVICE_URL = "http://www.myorderbox.com/anacreon/servlet/rpcrouter"; } else { $SERVICE_URL = "http://demo.myorderbox.com:9090/anacreon/servlet/rpcrouter"; } // HTTP DEMO SERVICE URL // $SERVICE_URL = "https://demo.myorderbox.com:9443/anacreon/servlet/rpcrouter"; // HTTPS DEMO SERVICE URL if ($this->registrar['debug'] == 1) { $DEBUG = true; } else { $DEBUG = false; } $data = array('DIRECTI_USERNAME' => $this->registrar['user'], 'DIRECTI_PASSWORD' => $this->registrar['pass'], 'DIRECTI_PARENTID' => $this->registrar['parent_id'], 'DIRECTI_URL' => $SERVICE_URL, 'DIRECTI_DEBUG' => $DEBUG, 'DOMAIN_NAME' => $this->domain_name, 'TERM' => $this->term, 'NS1' => $this->ns1, 'NS2' => $this->ns2, 'ACCT_USER' => $this->account['email'], 'ACCT_PASS' => $this->account['password'], 'ACCT_NAME' => $this->account['first_name'] . ' ' . $this->account['last_name'], 'ACCT_ADDR' => $this->account['address1'], 'ACCT_CITY' => $this->account['city'], 'ACCT_STATE' => $this->account['state'], 'ACCT_ZIP' => $this->account['zip'], 'ACCT_COUNTRY' => $this->country); include_once PATH_CORE . 'post.inc.php'; $post = new CORE_post(); $result = $post->post_data('192.168.2.6', '/agilebill/plugins/registrar/_directi/register.php', $data); #Debug if ($DEBUG) { echo $result; } if (ereg("REGISTER SUCCESS!", $result)) { return true; } else { return false; } }