检查密码保护网站的链接
我需要检查所有超链接是否仍然在受密码保护的私人网站上有效。这样做的最佳方法是什么?
该网站混合了 HTML 和 ASP.NET Webforms。
编辑:抱歉 - 我认为这个问题不清楚。
我需要这样的东西:
http://validator.w3.org/checklink
但是对于隐藏的网站在用户/通行证表格后面。我不介意以编程方式做某事或购买合理的东西。
I have a requirement to check that all the hyperlinks still work on a password protected, private website. What's the best way of doing this?
The site is mix of HTML and ASP.NET Webforms.
EDIT: Sorry - I don't think this question was clear.
I need something like this:
http://validator.w3.org/checklink
But for a site hidden behind a user/pass form. I don't mind doing something programmatically or purchasing something if it's reasonable.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
您应该认真查看 unix 命令行工具来执行此操作。 Esp wget
看一下 --spider 选项与 --user 的结合和 --password 选项...
另请参阅curl 或 libcurl+php
对于您的问题,有两件事不太清楚。
首先,需要什么样的用户/密码。这些可以是 POST 值,也可以是来自 http 协议的用户名和密码。你想要哪个?有多种方法可以向网站提供用户名和密码,无论您使用什么解决方案都必须适用于您的网站。这意味着您必须非常准确地了解您正在使用哪种方法。仅拥有用户名和密码这一事实还远远不够。
其次,不清楚您所说的“链接仍然有效”是什么意思,您的意思是根据您的应用程序的正常运行是否有效的内部链接,或者您的意思是指向恰好受密码保护的公共互联网站点的链接地点?
我假设后者是这个答案。但如果您指的是前者,那么您应该查看最近推出的几个 Web 应用程序测试套件之一。
哈特哈,
金融时报
You should seriously look at the unix command line tools to do this. Esp wget
take a look at the --spider option in combination with the --user and --password options...
Also take a look at curl or libcurl+php
There are two things that are not terrible clear about your question.
First, what sort of user/password are required. These can be POST values or they can be the username and password from the http protocol. Which do you want? There are several ways to provide a username and password to a website, and whatever solution you use has to work with your website. That means that you have to have a very accurate understanding of which method you are using. Just the fact that it has a username and password is not nearly enough information.
Second it is unclear what you mean by "links still work" do you mean internal links that will or will not work based on the proper functioning of your application, or do you mean links to public Internet sites that happen to be on a password protected site?
I am assuming the later with this answer. But if you meant the former then you should look into one of several web application test suites that have recently come available.
HTH,
FT
Rel Software 的 Web 链接验证器 与基于 Forms Auth 的网站配合得很好 - 我们一直在客户端网站上使用它已经有一段时间了。
需要注意的主要事项是:
Rel Software's Web Link Validator works quite happily with Forms Auth based sites - we've been using it on client sites for some time now.
The main things to watch out for are:
我喜欢使用 SimpleTest 来测试我自己的网站,但没有内置的链接检查器。< br>
您可以使用它来导航登录并获取页面正文。然后,您可以使用正则表达式解析内容以查找所有链接,并再次使用 SimpleTest 来验证这些链接(甚至抓取它们以递归地验证)。
当然,使用 cURL(或 libcurl 与您选择的语言)也可以让您非常接近。
I enjoy using SimpleTest for testing my own websites, but there's no built-in link checker.
You could use it to navigate the login and fetch the page body. You'd then parse the content using regular expressions to find all links, and use SimpleTest again to verify those links (and even crawl them to verify recursively).
Of course, using cURL (or libcurl with your language of choice) gets you pretty close, too.
您只需要验证 WebRequests ...
您被困在哪里?
-- 编辑
好吧,这取决于你所说的“密码保护”是什么意思。登录方案是如何实现的?
You just need to authenticate the WebRequests ...
Where are you stuck?
-- Edit
Well, it depends on what you mean by 'password protected'. How do is the login scheme implemented?
您可以使用 Apache httpclient 来执行此操作,具有 功能
You can do this using Apache httpclient has the features