新网域名查询接口

布利尼 2009-03-28 10:15:48
今天写了一个新网域名接口的程序
结果出现了几个问题不知道怎么解决
第一个
是API的问题
我把服务器的IP绑定了API
新网接口提交时候要的是服务器的IP,但是我提交以后传到新网那边的却是客户端IP,怎么才能提交服务器的IP
第二个值传过去以后获得的是
num=1&enc=E&name1=sina.com&chk1=0&err=auth-failure&IP=119-119-235-14
这么一个值.(值是在新网的网页上)
我怎么才能把这个字符串转换成变量传到我自己的页面中去


下面的是新网接口的说明
Check 接口
POST 地址: http://api.xinnet.com/domain/api.gb?method=check
http://api.xinnet.com/domain/api.gb?method=check&charset=utf-8 (utf-8字符集)
POST 参数: name 名字;1个,没有后缀
enc 编码,E,G;1个;
suffix 后缀;1-N个,域名后缀.com/.net/.org/.中国/cnaddr/.公司/...
client 代理号;1个
例如:name=abc&enc=E&suffix=.com&suffix=.net&suffix=.cn&client=agent111
POST 数据,必须进行URL编码
验证:client和POST的来源IP必须与该代理填写的地址一致

返回结果: num 域名数量
enc 编码
name[1--N] 域名,名字+后缀 N=num
chk[1--N] N=num 查询结果: 0 不可注册 100 可以注册

信息编码:
auth-failure 认证失败

例如:num=3&enc=E&name1=abc.com&chk1=0&name2=abc.net&chk2=100&name3=abc.org&chk3=-100
注意:通用网址suffix=cnaddr(目前仅提供老通用网址续费,不提供注册服务)
问题补充:补充一下问题
1,如何让新网获得我的服务器IP而不是客户端IP
2.新网传回来值以后我如何获得.并且传到我的页面当中去
...全文
1134 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
sqlx886 2011-12-13
  • 打赏
  • 举报
回复

组件网页头部

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>域名注册</title>
<!--#include file="Const.asp"-->

Const.asp

<%
'*********************************************************
'* API接口参数设置
'*********************************************************

'代理号
Const AgentId = "agent11111" '修改为您的代理号

'接口连接密码
Const linkPassword = "11111" '修改为您在代理后中增加IP提交的接口密码

'*********************************************************
'*下面为API系统接口地址
'*如果网页字符集为Utf-8时请修改为字符集utf-8的接口
'*********************************************************

'查询接口
Const CheckUrl = "http://api.xinnet.com/domain/api.gb?method=check" 'GB2312
'Const CheckUrl = "http://api.xinnet.com/domain/api.gb?method=check&charset=utf-8" 'utf-8字符集

'注册接口
Const RegisterUrl = "http://api.xinnet.com/domain/api.gb?method=Register" 'GB2312
'Const RegisterkUrl = "http://api.xinnet.com/domain/api.gb?method=Register&charset=utf-8" 'utf-8字符集

'续费接口
Const DomainRenewUrl = "http://api.xinnet.com/domain/api.gb?method=DomainRenew" 'GB2312
'Const DomainRenewUrl = "http://api.xinnet.com/domain/api.gb?method=DomainRenew&charset=utf-8" 'utf-8字符集

'查询域名是否注册成功
Const StatusUrl ="http://api.xinnet.com/domain/api.gb?method=Status" 'GB2312
'Const StatusUrl ="http://api.xinnet.com/domain/api.gb?method=Status&charset=utf-8" 'utf-8字符集

'修改域名信息
Const ModifyContactorUrl ="http://api.xinnet.com/domain/api.gb?method=ModifyContactor" 'GB2312
'Const ModifyContactorUrl ="http://api.xinnet.com/domain/api.gb?method=ModifyContactor&charset=utf-8" 'utf-8字符集

'修改域名DNS接口
Const ModDnsUrl = "http://api.xinnet.com/domain/api.gb?method=ModDns"
'Const ModDnsUrl = "http://api.xinnet.com/domain/api.gb?method=ModDns&charset=utf-8 (utf-8字符集)

'获取产品密码接口
Const GetProductKeyUrl = "http://api.xinnet.com/domain/api.gb?method=GetProductKey"
'Const GetProductKeyUrl = "http://api.xinnet.com/domain/api.gb?method=GetProductKey&charset=utf-8 (utf-8字符集)

'获取产品密码接口
Const ChangeProductKeyUrl = "http://api.xinnet.com/domain/api.gb?method=ChangeProductKey"
'Const ChangeProductKeyUrl = "http://api.xinnet.com/domain/api.gb?method=ChangeProductKey&charset=utf-8 (utf-8字符集)

'查询域名解析记录接口
Const DomainDNSQueryUrl = "http://api.xinnet.com/domain/api.gb?method=DomainDNSQuery"
'Const DomainDNSQueryUrl = "http://api.xinnet.com/domain/api.gb?method=DomainDNSQuery&charset=utf-8 (utf-8字符集)

'添加域名解析记录接口
Const DomainDNSAddUrl = "http://api.xinnet.com/domain/api.gb?method=DomainDNSAdd"
'Const DomainDNSAddUrl = "http://api.xinnet.com/domain/api.gb?method=DomainDNSAdd&charset=utf-8 (utf-8字符集)

'修改域名解析记录接口
Const DomainDNSModUrl = "http://api.xinnet.com/domain/api.gb?method=DomainDNSMod"
'Const DomainDNSModUrl = "http://api.xinnet.com/domain/api.gb?method=DomainDNSMod&charset=utf-8 (utf-8字符集)

'删除域名解析记录接口
Const DomainDNSDelUrl = "http://api.xinnet.com/domain/api.gb?method=DomainDNSDel"
'Const DomainDNSDelUrl = "http://api.xinnet.com/domain/api.gb?method=DomainDNSDel&charset=utf-8 (utf-8字符集)

'查询本域名下的DNS
Const GetSelfDNSUrl = "http://api.xinnet.com/domain/api.gb?method=GetSelfDNS"
'Const GetSelfDNSUrl = "http://api.xinnet.com/domain/api.gb?method=GetSelfDNS&charset=utf-8 (utf-8字符集)

'注册本域名下的DNS
Const AddSelfDNSUrl = "http://api.xinnet.com/domain/api.gb?method=AddSelfDNS"
'Const AddSelfDNSUrl = "http://api.xinnet.com/domain/api.gb?method=AddSelfDNS&charset=utf-8" ' (utf-8字符集)

'修改本域名下的DNS
Const ModSelfDNSUrl = "http://api.xinnet.com/domain/api.gb?method=ModSelfDNS"
'Const ModSelfDNSUrl = "http://api.xinnet.com/domain/api.gb?method=ModSelfDNS&charset=utf-8 (utf-8字符集)

'删除本域名下的DNS
Const DelSelfDNSUrl = "http://api.xinnet.com/domain/api.gb?method=DelSelfDNS"
'Const DelSelfDNSUrl = "http://api.xinnet.com/domain/api.gb?method=DelSelfDNS&charset=utf-8 (utf-8字符集)

%>


就说这么多!

62,267

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧