1

I am trying to get data from a URL like https://www.gov.uk/api/organisations/skills-funding-agency

It resolves in browser and returns Json response. But not returning anything when invoked from jquery Ajax. I tried jsonp

This might be Offtopic/particular case but I will improve this question to a amore generic one, once I recieve an answer

icoder
  • 11
  • 2

1 Answers1

0

An easy solution would be to run a simple ajax post to a php file that grabs the contents via file_get_contents() as recommended here: Is there a JavaScript way to do file_get_contents()?

Community
  • 1
  • 1
rch
  • 91
  • 2
  • 7
  • DId you try this?, as this API is expecing some origin header and denying my Request. – icoder Jun 19 '15 at 05:49
  • Yep, tested and working via file_get_contents. [PHP Fiddle Here](http://phpfiddle.org/lite/code/2dhg-6yqu) – rch Jun 19 '15 at 05:58