i trying get a json variable from php to foreUI and dosen’t work, i put my jsonvariable online (…) if anyone know how i supost to do that, please help.


2 answers

Hello Guilherme,

The problem is that your PHP script implements JSON API instead of JSONP API.

“The difference between JSONP and JSON is that, JSONP will wrap the JSON data as a function call, while the function name is passed in from the request URL. Calling JSONP API is usually used to workaround the “The Same Origin Policy” and get JSON data from different servers. You can find a lot of information about these via Google.”

The sentence above is taken from, you can read it if you want to learn more.

If the PHP script is implemented by you, you can easily change it to JSONP. Just output json value with a callback function, like this:

echo $_GET[“callback”].”({‘var’:’26.4′});”;

After doing this, if you visit…, you will get:


If you visit…, you will get:


Then you can use “Get JSON Object” action to call your PHP script.


Thanks a lot ! its working now, i just have to do what you say and work ! thanks !


This question is now closed