I\'ve been trying to make an AJAX request to an external server. I\'ve learned so far that I need to use getJSON to do this because of security reasons ?
Now, I can\
The simplest solution would be to add the below code before any output to your test.php file, then you have more flexibility with what methods you use, a standard ajax call should work.
header ('Access-Control-Allow-Origin: *');
However, use the json callback thing when your getting data from a server beyond your control.