JSON cross site without JSONP

后端 未结 5 926
半阙折子戏
半阙折子戏 2021-01-22 15:15

I have a local piece of hardware that I access via it\'s IP address to retrieve json data.

I am creating a web based app but it can not access the local json data when t

5条回答
  •  鱼传尺愫
    2021-01-22 15:50

    As Brad mentioned using a proxy is the way to go. Here's some more information on proxies:

    http://developer.yahoo.com/javascript/howto-proxy.html

    If you have access to a php server, I can recommend the proxy by http://www.troywolf.com/articles/. You'll need the following:

    • http://www.troywolf.com/articles/php/class_http/proxy.phps
    • http://www.troywolf.com/articles/php/class_http

提交回复
热议问题