Yes, you need one site / server to generate the information, and another to read the response. (I think I understood the purpose).
If it is, you would have to create requests, for a GET on the other server, it returns you a JSON.
To limit access we would use .htaccess, as a constraint for different IP connections. I do not know if SERVER to SERVER would work, just like client use, but it can be a simple alternative.
(There are several ways to create a TOKEN security pattern as well as common webservices.)
In practice:
The generation of data would have to have its trigger, in this case a GET request.
www.yourdomain.com/suaURLnaoAmigavel.php?gatilho=SEUS_PARAMETROS
if(isset($_GET['gatilho'])){
$abc = array();
$abc[]['title']=$valor;
$abc[]['image']=$valor2;
echo json_encode($abc).
}
In the end, I would use the PHP function json_encode($abc)
;
Output example:
[
{
"title": "Título do artigo",
"image": "http://...."
......
},
{
"title": "Título do artigo 2",
"image": "http://...."
......
}
]
Now let's go to JQuery, with the answer processing.
$.ajax({
url:'www.seuservidor.com/suaURLnaoAmigavel.php?gatilho=SEUS_PARAMETROS',
cache:false,
method:'GET',
success:function(d){
d=JSON.stringify(eval("(" + d + ")"));
d=(JSON.parse(d));
for(var inf=0;inf<=d.length;inf++){
$('#ondevcquiser').append(d[inf]['title']);
}
}
});
Remembering that I just gave you the very generic code, you'll have to work on it if it really helped you.
Good luck, I hope I have helped you!