[心得] jsonp proxy

看板Ajax作者 (moonet)時間14年前 (2011/01/15 13:35), 編輯推噓0(001)
留言1則, 1人參與, 最新討論串1/1
我們知道 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

01/15 13:35, , 1F
當然他傳回的 userAgent 資訊是 proxy 的
01/15 13:35, 1F
文章代碼(AID): #1DCJ843x (Ajax)
文章代碼(AID): #1DCJ843x (Ajax)