I have some values that i get from the database, then import to variables like:
So the problem is getting these variables and displaying them in other domains. It's supposed to be a user self-marketing thing where they can put code like below in any website:PHP Code:
$value1 = "Value1 returned by database";
$value2 = "Value2 returned by database";
$value3 = "Value3 returned by database";
$value4 = "Value4 returned by database";
So then the variables $value1, $value2, $value3,$value4 can be displayed at the other(users website or wherever they decide to post that code).PHP Code:
//Where id=2, 2 is the user ID
I think this can be done using JSON, XML but i think JSONP is suitable because it is touted as cross-domain. It will need to be cross-domain as the user can be able to post this code wherever they choose. I
I have researched but clear JSONP documentation on how to do such a simple thing and manipulate the received variables in order to display them as you want is not if ever easily found.
Explain below which tech i can use for this and how to go about it - it will be appreciated. Remember what will be used will need to be cross-domain as this will be like those affiliate links although this time this deliver some data to the website the code is at.