0

I am able to render JSON data in browser but when giving it as URL link in Javascript, it doesn't brings the data.

It shows null. The same thing happened when I use Java. I think this is the cross domain problem.

How to get resolve of this?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Pavan Kumar
  • 1,735
  • 2
  • 28
  • 47

2 Answers2

0

Use CURL to get the Data's from Cross Domaim. Curl is more reliable and best method for cross domain data obtain.

0

You could try to used jsonp. See Basic example of using .ajax() with JSONP?

You could also create a proxy, a simple php script on your web server that get the info from the remote server. See http://benalman.com/code/projects/php-simple-proxy/examples/simple/

Community
  • 1
  • 1
MagePal Extensions
  • 17,646
  • 2
  • 47
  • 62