通过 PHP cURL 获取文件内容 [英] Get file content via PHP cURL

查看:46
本文介绍了通过 PHP cURL 获取文件内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个网站.我们称之为 http://www.domain.com.现在,在这个 domain.com 上,我想显示 http://www.adserversite.com/ads.php 的文件内容.我怎样才能用 cURL 或其他方法做到这一点?我不想使用 iframe.

I have an website. Let's call it http://www.domain.com. Now, on this domain.com I want to display the file contents of http://www.adserversite.com/ads.php. How can I do that with cURL or another method? I don't want to use iframe.

谢谢

推荐答案

echo file_get_contents('http://www.adserversite.com/ads.php');

谁需要 curl 来完成这个简单的任务?

Who needs curl for this simple task?

这篇关于通过 PHP cURL 获取文件内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆