Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 218
Joyan Avatar asked Nov 15 '25 21:11

Joyan


1 Answers

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

$home = file_get_contents('example.com');
echo $home;
like image 157
Nunu Avatar answered Nov 18 '25 12:11

Nunu



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!