I am new to this and really confused about it. Forgive me if it sounds stupid. I want to embed content on another domain using script tags. I learnt that the page supplying the content has to be give a json answer. The page supplying the content is a php file which brings it from my database. How do i go abou this?
I tried a simple example of json but it did not work, what am i doing wrong?
test.php
<script type="text/javascript" src="http://example.com/test2.php?WrapperFunction=SomeFuncNameSpecifiedInTheRequest">
test2.php
<script type="text/javascript">
function SomeFuncNameSpecifiedInTheRequest({"data" : "<pre>Some Html</pre>"});
</script>