【发布时间】:2018-09-03 19:42:08
【问题描述】:
我正在尝试将用户引导至网站上的预填充页面,但该网站似乎需要事先访问才能允许访问。在第一页加载时会出现 403 Forbidden 错误,但在后续加载时它可以正常工作。
我假设这是某种类型的安全功能,有没有办法绕过它并将用户无错误地发送到此页面?
复制:
- 使用 Internet Explorer 或 Firefox
- 去这里:https://www.united.com/ual/en/us/flight-search/book-a-flight/results/?f=ORD&t=LAX&d=2018-03-28&r=2018-03-31&sc=7,7&px=1&taxng=1&idx=1
- 由于某种原因,Chrome 不受影响。
在您第一次加载时,您会收到警报:
The page encountered an error processing your request.
控制台说:
DOM7011: The code on this page disabled back and forward caching. For more information, see: http://go.microsoft.com/fwlink/?LinkID=291337
inprivate.htm
HTML1300: Navigation occurred.
results
DOM7011: The code on this page disabled back and forward caching. For more information, see: http://go.microsoft.com/fwlink/?LinkID=291337
inprivate.htm
HTML1514: Extra "<body>" tag found. Only one "<body>" tag should exist per document.
results (67,1)
HTML1424: Invalid character
results (2366,108)
HTML1424: Invalid character
results (2366,191)
HTML1521: Unexpected "</body>" or end of file. All open elements should be closed before the end of the document.
results (4099,522)
ajax error: 403 Forbidden; Requested URL: /ual/en/us/flight-search/book-a-flight/flightshopping/getflightresults/rev
SCRIPT7002: XMLHttpRequest: Network Error 0x2eff, Could not complete the operation due to error 00002eff.
results.
我尝试了以下解决方案,但都没有奏效:
- 在将 iFrame 发送到此页面以获取 cookie 之前在页面上加载 iFrame,该站点不允许 iFrame。
- 向网站发送 POST 请求,方法与主页上的航班搜索发送请求的方式相同。这也不起作用并给出了同样的错误。
任何帮助将不胜感激。
【问题讨论】:
-
你问过那个网站的开发者了吗?您还应该首先查看他们的服务条款,看看您是否被允许这样做。
-
我没有,我会尝试,但我认为不太可能得到回应。我在他们的条款和条件中看不到任何不允许直接链接到航班信息的内容。
-
我认为您的应用程序可能属于以下情况:“用户同意不使用任何设备、软件或例程来干扰或试图干扰本网站的正常工作或进行的任何活动在这个网站上。” 因为你干扰了网站的预期流量(人们浏览他们的搜索页面等)。像这样的网站通常有相当严格的 TOS。
标签: php security internet-explorer caching http-headers