从服务器获取结果 [英] Getting results from the server

查看:75
本文介绍了从服务器获取结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,


我有一个简单的客户端表单,用于检查域名注册商服务器上的域名可用性:
/>

< FORM action =" https://www.webnames.ru/scripts/RegTimeSRS.pl" method =" post">

< input type =" hidden"名称= QUOT; thisPage" value =" pispCheckDomain">

< input type =" hidden"命名= QUOT;用户名" value =" test">

< input type =" hidden"名称= QUOT;密码" value =" test">

domain_name:< input type =" text" name =" domain_name">< br>

< input type =" submit" RUNAT = QUOT;服务器" ID = QUOT; Submit1" value ="提交查询"

name =" Submit1">

< / FORM>


发送参数thisPage,其值为pispCheckDomain,告诉

系统检查域domain_name的可用性。


服务器响应如下:成功:<域名> ;可用或

成功:<域名>不可用。我可以在页面上看到它
https://www.webnames .ru / scripts / RegTimeSRS.pl

如何使用ASP.NET将这些结果导入我的页面?服务器返回任何参数都没有

信息,所以我需要自己构建

请求。我通常使用Request.QueryString(param)或

request.Form(param),但在这种情况下,没有param。指定。

对于网络程序员来说应该是非常简单的任务,但我之前从未做过这个

。这应该类似于查询Whois结果。


我将非常感谢您的建议。


谢谢,


-

Peter Afonin

Hello,

I have a simple client-side form that is checking the domain availability on
the domain registrar''s server:

<FORM action="https://www.webnames.ru/scripts/RegTimeSRS.pl" method="post">
<input type="hidden" name="thisPage" value="pispCheckDomain">
<input type="hidden" name="username" value="test">
<input type="hidden" name="password" value="test">
domain_name: <input type="text" name="domain_name"><br>
<input type="submit" runat="server" id="Submit1" value="Submit Query"
name="Submit1">
</FORM>

It sends parameter thisPage with the value pispCheckDomain that tells the
system to check availability of a domain domain_name.

The server responds like this: Success: <domain name> is Available or
Success: <domain name> is Unavailable. I can see it on the page
https://www.webnames.ru/scripts/RegTimeSRS.pl

How can I get these results to my page using ASP.NET? There is no
information that the server returns any parameters, so I need to construct
the request myself. I usually use Request.QueryString("param") or
request.Form("param"), but in this case there is no "param" specified.
Should be pretty easy task for a web programmer, but I''ve never done this
before. This should be similar to querying Whois results.

I would appreciate your advice.

Thank you,

--
Peter Afonin

推荐答案

彼得,

有一个查看System.Net.HttpWebRequest对象并使用它创建一个

表单帖子,然后您可以阅读响应并采取您需要的任何操作


HTH jd


" Peter Afonin"写道:
Hi Peter,
Have a look at the System.Net.HttpWebRequest object and use it to create a
form post, you can then read the response and take any action you require

HTH jd

"Peter Afonin" wrote:
您好,

我有一个简单的客户端表单,正在检查域名注册商服务器上的域可用性:

< FORM action =" https://www.webnames.ru/scripts/RegTimeSRS.pl" method =" post">
< input type =" hidden"名称= QUOT; thisPage" value =" pispCheckDomain">
< input type =" hidden"命名= QUOT;用户名" value =" test">
< input type =" hidden"名称= QUOT;密码" value =" test">
domain_name:< input type =" text" name =" domain_name">< br>
< input type =" submit" RUNAT = QUOT;服务器" ID = QUOT; Submit1" value ="提交查询"
name =" Submit1">
< / FORM>
它发送参数thisPage,其值为pispCheckDomain,告诉
系统检查域domain_name的可用性。

服务器响应如下:成功:<域名>可用或
成功:<域名>不可用。我可以在页面上看到它
https://www.webnames .ru / scripts / RegTimeSRS.pl

如何使用ASP.NET将这些结果导入我的页面?没有服务器返回任何参数的信息,所以我需要自己构建请求。我通常使用Request.QueryString(param)或
request.Form(param),但在这种情况下,没有param。对于网络程序员来说,这应该是非常简单的任务,但我之前从未这样做过。这应该类似于查询Whois结果。

我将非常感谢您的建议。

谢谢,

- Peter Afonin
Hello,

I have a simple client-side form that is checking the domain availability on
the domain registrar''s server:

<FORM action="https://www.webnames.ru/scripts/RegTimeSRS.pl" method="post">
<input type="hidden" name="thisPage" value="pispCheckDomain">
<input type="hidden" name="username" value="test">
<input type="hidden" name="password" value="test">
domain_name: <input type="text" name="domain_name"><br>
<input type="submit" runat="server" id="Submit1" value="Submit Query"
name="Submit1">
</FORM>

It sends parameter thisPage with the value pispCheckDomain that tells the
system to check availability of a domain domain_name.

The server responds like this: Success: <domain name> is Available or
Success: <domain name> is Unavailable. I can see it on the page
https://www.webnames.ru/scripts/RegTimeSRS.pl

How can I get these results to my page using ASP.NET? There is no
information that the server returns any parameters, so I need to construct
the request myself. I usually use Request.QueryString("param") or
request.Form("param"), but in this case there is no "param" specified.
Should be pretty easy task for a web programmer, but I''ve never done this
before. This should be similar to querying Whois results.

I would appreciate your advice.

Thank you,

--
Peter Afonin






谢谢。


不,但我会看看它。我已经设置了这样的几个系统,而且我总是将bb提交给参数,因此系统会向我发送

响应此地址。然而,在这种情况下,它不是必需的,而且这是我无法理解的



开发人员说他们正在使用模块LWP在Perl中,但他并不知道在ASP或ASP.NET中使用什么。


Peter


伦敦呼叫 <螺*********** @ discussions.microsoft.com>在消息中写道

新闻:E3 ********************************** @ microsof t.com ...
Hi,

Thank you.

No, but I''ll look at it. I''ve set up several systems like this, and always I
was submitting my URL as a parameter so the system would send me the
response to this address. In this case, however, it''s not required, and this
is what I cannot understand.

The developer said that they are using module LWP in Perl, but he doesn''t
know what to use in ASP or ASP.NET.

Peter

"london calling" <lo***********@discussions.microsoft.com> wrote in message
news:E3**********************************@microsof t.com...
嗨彼得,
看看System.Net.HttpWebRequest对象并用它来创建一个
表单帖子,然后你可以阅读响应并采取您需要的任何行动

HTH jd

Peter Afonin写道:
Hi Peter,
Have a look at the System.Net.HttpWebRequest object and use it to create a
form post, you can then read the response and take any action you require

HTH jd

"Peter Afonin" wrote:
您好,

我有一个简单的客户端表单,正在检查域名可用性
域名注册商的服务器:

< FORM action =" https://www.webnames.ru/scripts/RegTimeSRS.pl"
method =" post">
< input type =" hidden"名称= QUOT; thisPage" value =" pispCheckDomain">
< input type =" hidden"命名= QUOT;用户名" value =" test">
< input type =" hidden"名称= QUOT;密码" value =" test">
domain_name:< input type =" text" name =" domain_name">< br>
< input type =" submit" RUNAT = QUOT;服务器" ID = QUOT; Submit1" value ="提交查询"
name =" Submit1">
< / FORM>
它发送参数thisPage,其值为pispCheckDomain,告诉
系统检查域domain_name的可用性。

服务器响应如下:成功:<域名>可用或
成功:<域名>不可用。我可以在页面上看到它
https://www.webnames .ru / scripts / RegTimeSRS.pl

如何使用ASP.NET将这些结果导入我的页面?没有服务器返回任何参数的信息,所以我需要自己构建请求。我通常使用Request.QueryString(param)或
request.Form(param),但在这种情况下,没有param。对于网络程序员来说,这应该是非常简单的任务,但我之前从未这样做过。这应该类似于查询Whois结果。

我将非常感谢您的建议。

谢谢,

- Peter Afonin
Hello,

I have a simple client-side form that is checking the domain availability
on
the domain registrar''s server:

<FORM action="https://www.webnames.ru/scripts/RegTimeSRS.pl"
method="post">
<input type="hidden" name="thisPage" value="pispCheckDomain">
<input type="hidden" name="username" value="test">
<input type="hidden" name="password" value="test">
domain_name: <input type="text" name="domain_name"><br>
<input type="submit" runat="server" id="Submit1" value="Submit Query"
name="Submit1">
</FORM>

It sends parameter thisPage with the value pispCheckDomain that tells the
system to check availability of a domain domain_name.

The server responds like this: Success: <domain name> is Available or
Success: <domain name> is Unavailable. I can see it on the page
https://www.webnames.ru/scripts/RegTimeSRS.pl

How can I get these results to my page using ASP.NET? There is no
information that the server returns any parameters, so I need to
construct
the request myself. I usually use Request.QueryString("param") or
request.Form("param"), but in this case there is no "param" specified.
Should be pretty easy task for a web programmer, but I''ve never done this
before. This should be similar to querying Whois results.

I would appreciate your advice.

Thank you,

--
Peter Afonin



嗨Peter,


如果我理解正确的结果你是寻找是''页''

输出,虽然可能是纯文本(你发布的链接给我一个

错误)。

如果您使用HttpWebRequest将表单信息(例如,您正在寻找的域名等等)发布到服务器,您将获得一个HttpWebResponse对象。


这个(httpWebResponse)对象

包含其中一个名为GetResponseStream的方法,它是一个包含页面输出的
System.IO.Stream。 br />

使用Syatem.IO.StreamReader对象读取此流以获取页面主体

- 在这种情况下,字符串success:suchadomain.com is availiable ;。

然后你需要解析字符串,可能是将它分成空格字符

并分析字符串数组的部分


HTH jd


" Peter Afonin"写道:
Hi Peter,

If I understand correctly the result you are looking for is the ''page''
output, though probably in plain text (the link you posted gives me an
error).

If you use the HttpWebRequest to post your form information (e.g the domain
you''re looking for etc) to the server you get an HttpWebResponse object back.

This (httpWebResponse) object
contains among otherthings, a method called GetResponseStream which is a
System.IO.Stream containing the page output.

Read this stream using a Syatem.IO.StreamReader object to get the page body
- in this case the string "success: suchadomain.com is availiable".

You then need to parse the string probably by splitting it on space chars
and analysing the parts of the string array

HTH jd

"Peter Afonin" wrote:


谢谢。

不,但我会看看它。我已经设置了这样的几个系统,并且我总是将我的URL作为参数提交,因此系统会向我发送
响应该地址。然而,在这种情况下,它不是必需的,而且这是我无法理解的。

开发人员说他们在Perl中使用模块LWP,但他没有'' t
知道在ASP或ASP.NET中使用什么。

彼得

伦敦呼叫 <螺*********** @ discussions.microsoft.com>在消息中写道
新闻:E3 ********************************** @ microsof t.com。 ..
Hi,

Thank you.

No, but I''ll look at it. I''ve set up several systems like this, and always I
was submitting my URL as a parameter so the system would send me the
response to this address. In this case, however, it''s not required, and this
is what I cannot understand.

The developer said that they are using module LWP in Perl, but he doesn''t
know what to use in ASP or ASP.NET.

Peter

"london calling" <lo***********@discussions.microsoft.com> wrote in message
news:E3**********************************@microsof t.com...
嗨彼得,
看看System.Net.HttpWebRequest对象并使用它来创建一个
表单帖子,然后你可以阅读响应并接受任何你需要采取的行动

HTH jd

Peter Afonin写道:
Hi Peter,
Have a look at the System.Net.HttpWebRequest object and use it to create a
form post, you can then read the response and take any action you require

HTH jd

"Peter Afonin" wrote:
您好,

我有一个简单的客户端表单,正在检查域名可用性
域名注册商的服务器:

< FORM action =" https://www.webnames.ru/scripts/RegTimeSRS.pl"
method =" post">
< input type =" hidden"名称= QUOT; thisPage" value =" pispCheckDomain">
< input type =" hidden"命名= QUOT;用户名" value =" test">
< input type =" hidden"名称= QUOT;密码" value =" test">
domain_name:< input type =" text" name =" domain_name">< br>
< input type =" submit" RUNAT = QUOT;服务器" ID = QUOT; Submit1" value ="提交查询"
name =" Submit1">
< / FORM>
它发送参数thisPage,其值为pispCheckDomain,告诉
系统检查域domain_name的可用性。

服务器响应如下:成功:<域名>可用或
成功:<域名>不可用。我可以在页面上看到它
https://www.webnames .ru / scripts / RegTimeSRS.pl

如何使用ASP.NET将这些结果导入我的页面?没有服务器返回任何参数的信息,所以我需要自己构建请求。我通常使用Request.QueryString(param)或
request.Form(param),但在这种情况下,没有param。对于网络程序员来说,这应该是非常简单的任务,但我之前从未这样做过。这应该类似于查询Whois结果。

我将非常感谢您的建议。

谢谢,

- Peter Afonin
Hello,

I have a simple client-side form that is checking the domain availability
on
the domain registrar''s server:

<FORM action="https://www.webnames.ru/scripts/RegTimeSRS.pl"
method="post">
<input type="hidden" name="thisPage" value="pispCheckDomain">
<input type="hidden" name="username" value="test">
<input type="hidden" name="password" value="test">
domain_name: <input type="text" name="domain_name"><br>
<input type="submit" runat="server" id="Submit1" value="Submit Query"
name="Submit1">
</FORM>

It sends parameter thisPage with the value pispCheckDomain that tells the
system to check availability of a domain domain_name.

The server responds like this: Success: <domain name> is Available or
Success: <domain name> is Unavailable. I can see it on the page
https://www.webnames.ru/scripts/RegTimeSRS.pl

How can I get these results to my page using ASP.NET? There is no
information that the server returns any parameters, so I need to
construct
the request myself. I usually use Request.QueryString("param") or
request.Form("param"), but in this case there is no "param" specified.
Should be pretty easy task for a web programmer, but I''ve never done this
before. This should be similar to querying Whois results.

I would appreciate your advice.

Thank you,

--
Peter Afonin




这篇关于从服务器获取结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆