This is a very quick question.
Please refer this post.
Add header Access-Control-Allow-Origin to XMLHttpResponse in php
Where to add this code "header('Access-Control-Allow-Origin: *');"? I have same issues. Not sure where to add the code in the php script or javascript? Any help is appriciated.
I am creating a javascript widget for the other webmasters to consume. I have 2 javascripts and one php script. one javascript for the users to consume. That javascript calls the other one which makes the AJAX call and calls the PHP script which returns the json data.
I need the code sample.