卖逼视频免费看片|狼人就干网中文字慕|成人av影院导航|人妻少妇精品无码专区二区妖婧|亚洲丝袜视频玖玖|一区二区免费中文|日本高清无码一区|国产91无码小说|国产黄片子视频91sese日韩|免费高清无码成人网站入口

新網域名net接入源碼

public class XinNetApiBase{//默認代理編號public readonly static string AgentID = "agent88888";private Enco

public class XinNetApiBase

{

//默認代理編號

public readonly static string AgentID = "agent88888";

private Encoding _WebEncode = Encoding.GetEncoding("UTF-8"); private string _RequestString;

private string _Result;

private string _RequestUrl;

private WebClient _EWebClient = new WebClient();

///

/// 處理編碼

///

public Encoding WebEncode

{

get { return _WebEncode; }

set { _WebEncode = value; }

}

///

/// 請求的查詢參數

///

public string RequestString

{

get { return _RequestString; }

set { _RequestString = value; }

}

///

/// 請求返回的結果

///

public string Result

{

get { return _Result; }

set { _Result = value; }

}

,

///

/// 請求的URL 地址

///

public string RequestUrl

{

get { return _RequestUrl; }

set { _RequestUrl = value; }

}

///

/// 客戶端與服務器通信類

///

public WebClient EWebClient

{

get { return _EWebClient; }

set { _EWebClient = value; }

}

public XinNetApiBase(ApiType _apitype, List _list) {

this.RequestUrl = GetApiUrl(_apitype);

this.RequestString = GetRequestString(_list);

this.GetHttp();

}

public XinNetApiBase(string _ApiUrl, List _list) {

this.RequestUrl = _ApiUrl;

this.RequestString = GetRequestString(_list);

}

public string GetRequestString(List list) {

string requestUrl = "";

foreach (QueryParam q in list)

{

requestUrl = q.QueryName "="

,

HttpUtility.UrlEncode(q.QueryValue, this.WebEncode) "&";

}

return requestUrl.TrimEnd('&');

}

public string GetHttp()

{

this.EWebClient.Headers.Add(HttpRequestHeader.ContentType, "application/x-www-form-urlencoded");

this.EWebClient.Encoding = this.WebEncode;

this.Result = this.EWebClient.UploadString(new Uri(this.RequestUrl), "POST", this.RequestString);

return this.Result;

}

public string GetApiUrl(ApiType _ApiType)

{

string _Url = "";

switch (_ApiType)

{

case ApiType.Check:

_Url = "http://api.xinnet.com/domain/api.gb?method=check&charset=utf-8"; break;

case ApiType.Register:

_Url = "http://api.xinnet.com/domain/api.gb?method=Register&charset=utf-8"; break;

case ApiType.Status:

_Url = "http://api.xinnet.com/domain/api.gb?method=Status&charset=utf-8"; break;

case ApiType.ModDns:

_Url = "http://api.xinnet.com/domain/api.gb?method=ModDns&charset=utf-8";

,

break;

case ApiType.domain:

_Url = "http://api.xinnet.com/domain/api.gb?method=DomainRenew&charset=utf-8";

break;

case ApiType.GetProductKey:

_Url = "http://api.xinnet.com/domain/api.gb?method=GetProductKey&charset=utf-8";

break;

case ApiType.ChangeProductKey:

_Url = "http://api.xinnet.com/domain/api.gb?method=ChangeProductKey&charset=utf-8";

break;

case ApiType.ModifyContactor:

_Url = "http://api.xinnet.com/domain/api.gb?method=ModifyContactor&charset=utf-8";

break;

default:

_Url = "http://api.xinnet.com/domain/api.gb?method=testmd5&charset=utf-8"; break;

}

return _Url;

}

///

/// MD5加密

///

/// 加密的內容

/// 16或32 表示16位或32位 ///

public static string MD5(string _ConvertString, int _Len)

{

using (System.Security.Cryptography.MD5CryptoServiceProvider provider = new System.Security.Cryptography.MD5CryptoServiceProvider())

,

{

switch (_Len)

{

case 16:

return

4, BitConverter.ToString(provider.ComputeHash(Encoding.UTF8.GetBytes(_ConvertString)),

8).Replace("-",

string.Empty).ToUpper(System.Globalization.CultureInfo.CurrentCulture);

case 32:

return BitConverter.ToString(provider.ComputeHash(Encoding.UTF8.GetBytes(_ConvertString))).Replace("-", string.Empty).ToUpper(System.Globalization.CultureInfo.CurrentCulture); default:

return BitConverter.ToString(provider.ComputeHash(Encoding.UTF8.GetBytes(_ConvertString))).Replace("-", string.Empty).ToUpper(System.Globalization.CultureInfo.CurrentCulture);

}

}

}

}

public class QueryParam

{

private string _QueryName;

private string _QueryValue;

public string QueryName

{

set { this._QueryName = value; }

get { return this._QueryName; }

}

public string QueryValue

{

,

set { this._QueryValue = value; }

get { return this._QueryValue; }

}

public QueryParam(string _Name, string _Value)

{

this.QueryName = _Name;

this.QueryValue = _Value;

}

}

public enum ApiType

{

Check,

Register,

Status,

ModDns,

domain,

GetProductKey,

ChangeProductKey,

ModifyContactor

}

List param = new List();

param.Add(new QueryParam("name", "viqiwu")); param.Add(new QueryParam("enc", "E"));

param.Add(new QueryParam("suffix", ".com")); param.Add(new QueryParam("suffix", ".com.cn")); param.Add(new QueryParam("suffix", ".cn"));

param.Add(new QueryParam("client", "agent88888"));

XinNetApiBase _XinNet = new XinNetApiBase(ApiType.Check, param);

Response.Write(_XinNet.Result);

//_XinNet.Result 返回的結果

,

num=3&enc=E&name1=viqiwu.com&chk1=0&name2=viqiwu.com.cn&chk2=100&name3=viqiwu.cn&chk3=0

//chk1=0 表示不能注冊了 chk1=100 表示可以注冊

Xinnet Corp. 北京新網數碼信息技術有限公司

POST 參數注意事項:

所有電話號碼及郵編必須為數字,且不能為零

所有英文信息字段必須為

本接口暫時不支持信任制代理

1. 文檔說明

1.1 文檔簡介

本版本采用HTTP POST方式進行注冊。

1.2 使用限制

只有新網的正式代理才能使用。

必須符合接口認證方式才能提交命令。

注冊接口按照該代理的價格進行實時注冊實時扣費,如果預付款不足,將不能提交注冊申請。 接口文檔的獲得和傳播必須符合新網的保密協(xié)議

1.3 操作說明

1。代理在新網代理專區(qū)填寫授權POST 的IP 地址和認證密碼。

2。按照接口說明編寫客戶端程序向接口提交查詢、注冊命令,立刻獲得結果。

1.4 域名范圍

國際域名,.com,.net,.org,.biz,.info ,.cc,.mobi 域名, 包括中文.com,.cc

國內域名,.cn,.com.cn 類,. 中國,. 網絡,. 公司, 通用網址

1.5 md5串測試地址:

url:http://api.xinnet.com/domain/api.gb?method=testmd5

輸出:strbuf 內容及編碼后的md5串

中文編碼使用gb2312 或者utf-8編碼,否則易出現(xiàn)md5校驗錯誤:verify-failure 摘要認證失敗 關于此處說明:請確保相關程序文件的charset 設置和文件自身保存的編碼一致。

并請保證所有關聯(lián)文件編碼一致,您明確要求不一致(需轉碼)的除外

gb2312和utf-8中文md5結果可能不同,請確保提交內容字符集和md5串一致。

2. 接口概述

2.1 接口目錄

Check接口:主要負責進行域名的查詢,采用多線程方式,可以同時查詢多個域名

Register接口:注冊接口,實時注冊,成功后立即扣費。如果超時,不轉為后臺注冊,域名將被刪除。

不提供通用網址注冊服務。

,

Status接口:查詢域名是否注冊成功。

ModDns接口: 進行在線修改DNS 操作。

domain續(xù)費接口:域名續(xù)費接口,實時續(xù)費,立即扣費。

獲取產品密碼接口:獲取域名管理密碼、mydns 密碼以及域名到期時間。

修改產品密碼接口:修改域名管理密碼以及mydns 密碼。

ModifyContactor 接口:修改除域名所有人以外的所有聯(lián)系人信息。

注冊本域名下的DNS :注冊本域名下的DNS 。

查詢本域名下的DNS :查詢本域名下的DNS 。

修改本域名下的DNS :修改本域名下的DNS 。

刪除本域名下的DNS :刪除本域名下的DNS 。

2.2 認證方式

1。IP 限制,對于任何接口必須從該代理授權的IP, 每個代理限填3個IP 地址

2。MD5非可逆加密摘要,除Check 接口、和Status 接口外,其它所有接口都要求提供

2.3 返回結果

按照POST 數據格式返回數據結果

3. 接口說明

3.1 Check 接口

POST 地址: http://api.xinnet.com/domain/api.gb?method=check

enc 編碼,E,G ;1個;

suffix 后綴;1-N 個, 域名后綴.com/.net/.org/.中國/cnaddr/.公司/

client 代理號;1個

t111

POST 數據,必須進行URL 編碼

驗證:client 和POST 的來源IP 必須與該代理填寫的地址一致

返回結果: num 域名數量

enc 編碼

name[1--N] 域名, 名字 后綴 N=num

chk[1--N] N=num 查詢結果: 0 不可注冊 100 可以注冊

信息編碼:

auth-failure 認證失敗

例如:name=abc&enc=E&suffix=.com&suffix=.net&suffix=.cn&client=agen

,

例如:num=3&enc=E&name1=abc.com&chk1=0&name2=abc.net&chk2=100&name3=abc.org&chk3=-100

注意:通用網址suffix=cnaddr(目前僅提供老通用網址續(xù)費,不提供注冊服務)

3.2 Register 接口

POST 地址: http://api.xinnet.com/domain/api.gb?method=Register

POST 參數:

[域名信息]

dn 域名;1個, 包括名字和后綴

enc 編碼,E,G ;1個;

client 代理號;1個

checksum MD5加密摘要

,

uteln 注冊人電話號碼 (區(qū)號 電話號碼長度必須小于12)

utele 注冊人電話分機

ufaxc 注冊人傳真國家碼, 可以不填默認為86,長度不能大于3位

ufaxa 注冊人傳真區(qū)號 如果為手機可以不填,此項不可為0

ufaxn 注冊人傳真號碼 必須為數字 (區(qū)號 傳真號碼長度必須小于12) ufaxe 注冊人傳真分機

uemail 注冊人email 地址

trade 注冊人所在行業(yè)英文編碼 [如果不填,默認為商業(yè)S8]//此字段最好不填,如果

填寫,千萬不能用小寫S

[域名管理聯(lián)系人信息] 管理聯(lián)系人單位地址信息和注冊人信息一致,所以不用填

uincode travel域名UIN 編碼 travel域名必須,其他域名不需要

certtype asia域名證件類型 asia域名必須,其他域名不需要

passport 護照或居民身份證

certificate 營業(yè)執(zhí)照

legislation 特許成立的法定機構證明

societiesRegistry 非營利團體登記證明

politicalPartyRegistry 政黨注冊證明

other 其他

certcode asia域名證件號碼 asia域名必須,其他域名不需要

entitytype asia域名實體類型 asia域名必須,其他域名不需要

naturalPerson 個人

corporation 公司或社團法人

cooperative 合作社

partnership 合伙或集體公司

government 政府機關

politicalParty 政黨或工會

society 信托管理機構﹑資產管理機構﹑協(xié)會或社團

institution 公共機構

other 其他

aname1 管理聯(lián)系人中文名稱 [國內域名必填]

aname2 管理聯(lián)系人英文名稱 [國際域名必填]

atelc 管理聯(lián)系人電話國家碼 可以不填默認為86,長度不能大于3位

atela 管理聯(lián)系人電話區(qū)號 如果為手機可以不填

ateln 管理聯(lián)系人電話號碼 區(qū)號 電話號碼長度必須小于12

atele 管理聯(lián)系人電話分機 可以不填,此項不可為0

標簽: