简体   繁体   English

HTML从其他服务器发送和接收数据

[英]HTML send and receive data from another server


Failed trying to find "newest" solution to send data from client and receive the data with another server. 尝试查找“最新”解决方案以从客户端发送数据并通过另一台服务器接收数据失败。
One solution I found is the "Google Analytics" way- send data with image request. 我发现的一种解决方案是“ Google Analytics(分析)”方式-通过图像请求发送数据。
I have looked https://developers.google.com/analytics/resources/concepts/gaConceptsTrackingOverview , and have overall concepts. 我查看了https://developers.google.com/analytics/resources/concepts/gaConceptsTrackingOverview ,并了解了总体概念。
Question about this is how can I send image request and process the image request like 问题是如何发送图像请求并处理图像请求,例如

http://www.google-analytics.com/__utm.gif?utmwv=4&utmn=769876874&utmhn=example.com...

in another server? 在另一台服务器上? Example will help a lot. 例子会很有帮助。

Also I will be so happy if someone can share another way of doing it. 如果有人可以分享另一种方式,我也会很高兴。

If you are making a request to the same domain, you can use root-relative paths instead of including the domain. 如果要向同一个域发出请求,则可以使用根相对路径而不是包括域。 example: GET /path/to/action 示例:GET /path/to/action

Otherwise you could use JSONP if the remote server supports it. 否则,如果远程服务器支持,则可以使用JSONP。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM