【问题标题】:PHP get http url and return https url [closed]PHP获取http url并返回https url [关闭]
【发布时间】:2014-09-13 17:05:11
【问题描述】:

我不太确定该怎么做,我有一个类似http://turgw.t4w.com.br/_teste/fornecedor/geopopup.aspx?HotelID=142498 的 URL,我需要获取内容并将其返回到使用 ssl 的网站。上面的 URL 不支持 ssl,所以浏览器阻止了它,我想知道我是否可以使用 php 获取内容并将我的服务器用作代理并从我的域返回一个新的 url 并加密 ssl。任何人都可以帮忙吗?谢谢!

【问题讨论】:

  • 当然,您可以使用 cURL 来抓取它,然后在您的 SSL 服务器上提供它,但是您需要将该页面中的 http:// 链接替换为 https://

标签: php ssl https proxy


【解决方案1】:

查看readfilehttp://fi1.php.net/manual/en/function.readfile.php

你可以这样使用它:

readfile('http://turgw.t4w.com.br/_teste/fornecedor/geopopup.aspx?HotelID=142498');

这应该就是您指定的所有内容。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-05-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-05-28
    • 1970-01-01
    • 2020-02-29
    • 2016-07-28
    相关资源
    最近更新 更多