主持人如何在不使用浏览器打开网页的情况下运行网页 [英] how can a host run a webpage without open that page with an explorer

查看:78
本文介绍了主持人如何在不使用浏览器打开网页的情况下运行网页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨 在一个项目中,我们有一个带有计时器的网页.计时器每1分钟检查一次收到的短信.在浏览器打开之前,该页面运行良好.

我想要主机(我们的服务器)自动运行页面并每1分钟运行一次计时器.
我不知道该怎么办?

解决方案

没有运行页面"之类的东西.您只能加载页面,收集页面内容并以所需方式对其进行处理.这与"网络抓取"有关.

基本上,您需要使用System.Net.WebRequestSystem.Net.WebResponse类,请参见:
http://msdn.microsoft.com/en-us/library/system.net. httpwebrequest.aspx [ ^ ],
http://msdn.microsoft.com/en-us/library/system.net. httpwebresponse.aspx [ ^ ].

有关更多详细信息,请阅读我过去关于此主题的解决方案:
从网页中获取特定数据 [如何从另一个站点获取数据 [ ^ ].

我想我已经足够详细地解释了这一切.

—SA


hi in a project we have a webpage with a timer in it.the timer every 1 minute checkes the recieved sms es.the page is working well until the browser is opened.

i want ,the host(our server)automatically run the page and run the timer every1 minutes.
i dont know how can i do this?

解决方案

There is no such thing as "run the page". You can only load the page, collect it content and process it the way you want. This is something related to "Web scraping".

Basically, you need to use the classes System.Net.WebRequest and System.Net.WebResponse, please see:
http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest.aspx[^],
http://msdn.microsoft.com/en-us/library/system.net.httpwebresponse.aspx[^].

For further detail, read my past solutions on this topic:
get specific data from web page[^],
How to get the data from another site[^].

I think I explained it all in sufficient detail.

—SA


这篇关于主持人如何在不使用浏览器打开网页的情况下运行网页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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