作者etrexetrex (moonet)
看板Ajax
標題[心得] jsonp proxy
時間Sat Jan 15 13:34:56 2011
我們知道 jsonp 是需要 server side 支援才有可能辦到
比方說這個網站不支援 jsonp
API介紹 :
http://useragentstring.com/pages/api.php
用法 :
http://www.useragentstring.com/?getJSON=all
所以我們需要另一台 server 去讀取上面的 json 然後支援 jsonp
正好已經有網站幫我們作這件事了
API介紹 :
http://blog.jsonpify.com/post/435053442/jsonpify-proxy-service
用法 :
http://ppt.cc/s4fy
所以我們可以實驗一下效果
到這裡 :
http://ppt.cc/dDH(
import 這個 jsonp :
http://ppt.cc/nC_(
就會看到正確的完成任務
--
blog:
http://etrex.blogspot.com/
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 118.167.9.172
1F:→ etrexetrex:當然他傳回的 userAgent 資訊是 proxy 的 01/15 13:35