php - Bypassing cross origin policy using JQuery/javascript with no access to remote server -


i want retrieve following json using javascript:

https://www.gov.uk/api/organisations/skills-funding-agency

if jsonp call get:

callback=jquery1113043552865949459374_1434727982051&_=1434727982052' because mime type ('application/json') not executable, , strict mime type checking enabled.

if json call get:

xmlhttprequest cannot load no 'access-control-allow-origin' header present on requested resource. origin 'null' therefore not allowed access.

is @ possible? i've been googling hours without success. i've seen php solutions ideally don't want have install php this.

thanks in advance!

if don't wanna install php this, why did tag ? need use server side script proxy php file, reads content , executes correctly.

proxy.php:

<?php     header("content-type: application/json");     die(file_get_contents($_get["url"])); ?> 

and call this:

url: "proxy.php?url=http://gov.uk/blah/blah" 

Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -