如何使用PHP显示另一个站点的内容? [英] How to display content of one site in another using PHP?
本文介绍了如何使用PHP显示另一个站点的内容?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我尝试显示两个网站的内容,有人建议我使用RSS阅读器,但我的问题是:
I'm trying to show contents of two websites in one another , someone suggest me to use RSS reader but my question is :
尝试显示内容,除了使用rss!?
is there anything else i could try to show the contents , beside using rss !?
我想我可以连接到另一个网站的数据库,但没有工作/
i thought i can connect to the database of another website , but that didnt work /
提前感谢
推荐答案
某些网站托管已禁用readfile但您可以使用file_get_contents函数。
some of web hosting has disabled "readfile" function. But you can use "file_get_contents" function.
$home = file_get_contents('example.com');
echo $home;
这篇关于如何使用PHP显示另一个站点的内容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文