如何获取Https URL内容

发布于 2024-07-07 08:46:35 字数 654 浏览 5 评论 0 原文

我有一个 https 链接,需要用户登录 & 密码。 如果我像这样在 FX 中运行它: https://[电子邮件& nbsp; protected]/link/sublink

它将按预期返回 xml 数据。

然而,我想做的是自动化这个过程。 我尝试在 PHP 中使用 file_get_contents()

我什至尝试使用AJAX,但仍然不起作用。

我尝试在服务器或前端(ajax)中获取内容(XML),但两者都不起作用。

有谁知道我需要做什么才能获得内容? 我需要获取 SSL 证书吗?

任何其他语言的解决方案也将受到欢迎。

I have a https link that requires user login & password. If I run it in FX like this:
https://[email protected]/link/sublink

it will return the xml data as expected.

However, what i'm trying to do, is to automate this process.
I try to use file_get_contents() in PHP.

I even tried to use AJAX, but still doesn't work.

I tried to get the content (XML) either in Server or in the front-end (ajax), but both don't work.

Does anyone know what I need to go in order to get the content? Do I need to obtain the SSL certificate?

Solution in any ohter languages will be welcome too.

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

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

发布评论

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

评论(3

我为君王 2024-07-14 08:46:35

通过其 libcurl java/" rel="nofollow noreferrer">Java 绑定。

Use libcurl via its Java bindings.

伤痕我心 2024-07-14 08:46:35

您应该使用curl库,如果您想防止中间人攻击,还应该验证证书。 或者使用curl 选项忽略它。

You should use curl library, also certificate should be verified if you want to prevent man-in-the-middle attacks. Or just ignore it using curl options.

无声静候 2024-07-14 08:46:35

支持 SSL 的 cURL 或 wget。

cURL,您可以通过编译的 PHP 库运行或从 PHP 调用可执行文件。

Wget,您将必须调用可执行文件。

cURL or wget with SSL support.

cURL, you can run either through the compiled PHP library or call the executable from PHP.

Wget, you will have to call the executable.

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