来自 PC 的 HTTP 请求,用于加载 wap 站点的内容

发布于 2024-08-30 19:35:36 字数 151 浏览 5 评论 0原文

当我尝试从我的 PC 加载带有 PHP HTTP 请求的 wap 站点时,网站主机识别出我正在从 PC 发送请求,并将我重定向到他们的实际网站,但我无法加载该 wap 站点。有没有办法像移动浏览器一样运行并阻止这种重定向?虽然关于任何编程语言的答案都可以,但特定于 php 的答案会更好。

When I try to load a wap site with PHP HTTP request from my PC, host of the web site recognizes that I'm sending the request from a PC and redirects me to their actual web site and I can't load the wap site. Is there a way to behave like a mobile browser and prevent this redirection? Although an answer regarding any programming language is ok, a php specific answer will be better.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

枯叶蝶 2024-09-06 19:35:36

此行为通常由 HTTP 请求上的用户代理字符串决定。您通常可以欺骗用户代理字符串,并将其替换为移动设备的用户代理,或者如果您使用的是 Firefox,则可以下载用户代理切换器插件。

This behavior is normally dictated by the User-Agent string on the HTTP request. You can usually spoof the User-Agent string, and replace it with the user-agent of a mobile device, or if you're using Firefox, you can download a User-Agent Switcher plugin.

救星 2024-09-06 19:35:36

更改您的用户代理。

此网站也很有帮助,因为许多网站使用此代码或类似代码来识别移动设备。

Change your user agent.

This site is helpful too as many sites use this code or similar to identify mobile devices.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文