开发者

Better Understanding of Web Proxies for php and javascript

开发者 https://www.devze.com 2022-12-11 02:24 出处:网络
I am trying to develop a analytic s project. My goal is to let a owner of x-domain be allowed to copy and paste a small snippet of javascript includes on to their site, from my server. That will be ab

I am trying to develop a analytic s project. My goal is to let a owner of x-domain be allowed to copy and paste a small snippet of javascript includes on to their site, from my server. That will be able to analyze the end users experience on their site.

Given that my server is php, and I will sending and recieving data larger then the browser max limit, my question is...

Does only 1 server need to have the web proxy In order to make a successful exchange of data ? (i.e. can the x-domain send data back to me and not require a proxy as well?)

Since I am only gathering data from the x-domain, I only need for x-domain to send me data. There is no need for my server to send data to it. Since I am using php/apache for my server. will I only need configure php to setup this proxy in order for javascript to send the data.

I notice that yahoo developers netw开发者_高级运维ork got sample code for setting up a web proxy. Could I use this for my own use and own work ? Are there any good resources out there to get me start on doing this correctly ?

Thanks for you guys responses. I appreciate it.


You should not need any proxies. You should also not be using ajax, but be passing data to a hidden "<img>" in the page. This is how the Google gets around the cross-domain issue: they load a "gif", only it's not really a gif, but just simply a path to their server which feeds user data as it happens.

This may be your best bet to get around the cross-domain issue.

0

精彩评论

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

关注公众号