通过PHP cURL获取文件内容 [英] Get file content via PHP cURL
本文介绍了通过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屋!
查看全文