开发者

Javascript/php: xmlHttpRequest or (excluding header change ideally)

I have a php script which processes xml returned from an api call. What I hope to achieve is to be able set the javascript as a 开发者_C百科bookmark, or better yet to load every time a document.location value changes. (currently set as bookmark).

The problem I'm having is gettin' passed the xmlHttpRequest's same server policy. As the php script requires that it is hosted on an external domain I can't access the php script to generate the results.

I've seen several scripts on the internet that apparently do it but they either carry out no function or still require accessing an external php script as a proxy.

Any thoughts?

Thanks.


Javascript has certain rules for security reasons. This is one of them. In the alternative, you can pass the output of the script output from the php file to your server first before passing to your client. Hope it helps.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜