Page 1 of 1

PHP load from specific file from 1. site and put into 2.site

Posted: Sat Jun 20, 2015 10:21 am
by mladja04
Hello. I have some problem and I hope that I write this question into right category.

I have 2 different sites and in first I have one file 1.php in which is 1 row code: {"link_1":"something1","link_2":"something2","link_3":"something3"}

In this file something1, something2 and something3 are changed very often by some script.

Do I can on some way in my second site with php command to take only often changed something1, something2 and something3 from first site and implement into php script in my second site (and that to be visible for users into my second site)?

Can you help me and tell me how to do this (command or script to write me)?

Thank you very much,
Maki

Re: PHP load from specific file from 1. site and put into 2.

Posted: Sat Jun 20, 2015 11:05 am
by Christopher
Use cURL (or compatible class) to fetch 1.php, convert JSON to PHP data, and display to data.

Re: PHP load from specific file from 1. site and put into 2.

Posted: Sat Jun 20, 2015 2:39 pm
by mladja04
Thank you very much.

I hope that I will find on net how to use this commands.

Re: PHP load from specific file from 1. site and put into 2.

Posted: Sat Jun 20, 2015 6:50 pm
by Christopher