cross-domain-proxy

Cross-domain getJson request with Simple PHP proxy

非 Y 不嫁゛ 提交于 2019-12-14 02:28:34
问题 Hi I'm trying to get data from an api that ONLY returns JSON rather than JSONP. Every time I try to get the data connecting as JSONP it doesn't work because I am not expecting JSON. So, I guess I have to use a PHP proxy to get past the cross-domain issue so I can interpret the JSON request. [Simple PHP Proxy][1] is one that I'm trying to use but I am having a hell of a time trying to get the most basic functionality to work. When I type the url I want to query into his example on the example

cross-site request

半世苍凉 提交于 2019-12-11 07:27:43
问题 Should be done with the site number 1 request to the site number 2. Let the number one site will be localhost, and the site number 2 - the real server on the Internet. At site 2 there is a file result.php, which takes GET-requests: $var = @$_GET['q'] ; $s = $_GET['s'] ; $typefile = $_GET['type']; If the page result.php make a request, then we obtain the URL: result.php?q=%F4%FB%E2&type=1&search=%CF%EE%E8%F1%EA%21 How better to make a request? Can someone show me some examples to help? For 4