I am taking a stab in the dark here.
I cannot do a cross domain request to get a piece of json data. I have tried this several ways but the cross domain policy keeps getting me. Is there a way I can do this by just parsing the data inside a hidden iframe? Is this possible using javascript?
http://www.nfl.com/liveupdate/scorestrip/ss.json is the json page
Whenever crossdomain policy puts me up against the fence, I use a
PHPproxy.Use
PHPto curl in the file you want and then it’s as good as yours. When you hit thePHPfile (which is on your server) there’s no cross domain issues.Your PHP file will look like something like this. Now whenever you hit the
PHPfile, you’ll see the file you curled, but it appears to be coming from your domain.This is basically a cheap trick and should only be used when you have no control over the policies.
Here’s the PHP code you will need: