How to display content of one site in another using PHP?

Joyan picture Joyan · Apr 29, 2010 · Viewed 17.4k times · Source

I'm trying to show contents of two websites in one another , someone suggest me to use RSS reader but my question is :

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 /

thanks in advance

Answer

Nunu picture Nunu · Aug 3, 2011

some of web hosting has disabled "readfile" function. But you can use "file_get_contents" function.

$home = file_get_contents('example.com');
echo $home;