dougong9987 2014-09-13 17:05
浏览 57
已采纳

PHP获取http url并返回https url [关闭]

I am not really sure how to do this, I have an URL like this http://turgw.t4w.com.br/_teste/fornecedor/geopopup.aspx?HotelID=142498, wich I need to get the content, and return it to a website that uses ssl. The URL above does not suport ssl, so the browser is bloking it and I am wondering if I could get the content with php and use my server as a proxy and return a new url from my domain and ssl encrypted. Anyone can help? Thank You!

  • 写回答

1条回答 默认 最新

  • duanfen2008 2014-09-13 17:09
    关注

    Check out readfile: http://fi1.php.net/manual/en/function.readfile.php

    You could use it like this:

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

    That should be all you need to do what you specified.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 帮我解决这个项目,thank you各位程序员
  • ¥15 哪位能用ea软件做一下,有偿
  • ¥15 按要求编写汇编语言,并设计仿真电路图
  • ¥15 电脑软件运行次数如何统计
  • ¥15 同一个浏览器打开两个窗口怎么区分会话
  • ¥100 如何编写自己的emmc镜像
  • ¥15 starccm线性内聚力模型
  • ¥15 点云四边形凸包确定顶点
  • ¥15 关于redhat虚拟机系统新建卷的问题
  • ¥50 WRFDA读取风云四号A 星的GIIRS数据