简体   繁体   English

将数据从一页发送到另一台服务器。 语言不可知

[英]Sending data from one page to another server. Language agnostic

I'll try to keep this short and simple. 我会尽量保持简短。 I haven't begun writing the code for this project yet, but I'm trying to work out the pre-coding logistics as of right now. 我还没有开始为这个项目编写代码,但是到目前为止,我正在尝试解决预编码问题。

What I am looking to do, is create a method of sending data from one/any site, to another remote server, which would generate a response for the user requesting the data be sent. 我要做的是创建一种从一个/任何站点向另一个远程服务器发送数据的方法,该方法将为用户请求发送数据生成响应。

Specifically, a web designer should be able to take a snippet of code I would have available on my website, implement it into their own page(s), and when a user browses their page(s), my service would be available. 具体地说,Web设计人员应该能够获取我可以在自己的网站上获得的代码片段,并将其实现到自己的页面中,并且当用户浏览其页面时,我的服务将可用。

A specific example, a web designer with a website ( helloworld.com ) could implement my code into their page ( helloworld.com/index.html ). 一个具体的例子是,拥有网站( helloworld.com )的网页设计师可以将我的代码实现到他们的页面( helloworld.com/index.html )中。 When a user is viewing the page ( /index.html ), the user hovers the mouse over a text word (lemonade) for a couple seconds, a small dialog box pops up beside it, providing the user with some options specific to the text (example of an option would be "Define 'lemonade' at Dictionary.com") that if selected, would be processed at, and a response would be returned from my remote server ( myremoteserver.com ) 当用户查看页面( /index.html )时,用户将鼠标悬停在文本单词(柠檬水)上几秒钟,在其旁边弹出一个小对话框,为用户提供了一些特定于文本的选项(选项的示例为“在Dictionary.com上定义'lemonade'”),如果选择该选项,将在myremoteserver.com进行处理,然后从我的远程服务器( myremoteserver.com )返回响应。

Obviously, I would want the code that designers would be using to be as lightweight and standalone as possible. 显然,我希望设计人员使用的代码尽可能轻巧和独立。 Any ideas as to how I could execute this? 关于如何执行此操作有任何想法吗? Resources I should study, and methods I could implement? 我应该学习的资源以及可以实现的方法?

Please do not create another one of those services that annoyingly double-underlines words in web site content and then pops up a ugly, slow-to-load ad over the content if I accidentally mouse over the word. 请不要创建其中一项会令人讨厌地在网站内​​容中加双下划线的服务,如果我不小心将鼠标悬停在单词上,则会在内容上弹出难看且加载缓慢的广告。 Because that sounds like what you're doing. 因为这听起来像您在做什么。

If you're going to do it anyway, then what the "remote server" will be will probably actually be a bit of client-side JavaScript, in which case JSON is probably your best bet. 如果您仍然要这样做,那么“远程服务器”可能实际上是一些客户端JavaScript,在这种情况下, JSON可能是您的最佳选择。 XML could also work, but even when JavaScript isn't on the other side, I rather like JSON as a serialization technique due to its compactness and readability. XML也可以工作,但是即使JavaScript不在另一侧,由于其紧凑性和可读性,我还是更喜欢JSON作为序列化技术。

I think you are talking about a hyperlink. 我认为您是在谈论超链接。

The part that has you confused is the level of interactivity you want on the client site. 让您感到困惑的部分是您希望在客户端站点上进行交互的程度。 Whatever sort of neat UI interface you want to wrap around the link will probably be done in javascript and need to be supplied to that site. 无论您要包装链接的哪种整洁的UI界面,都可能会在javascript中完成,并且需要提供给该网站。 The core of what you're asking for 您所要求的核心

text ... that if selected, would be processed at, and a response would be returned from my remote server (myremoteserver.com) 文本...如果选中,将在远程服务器(myremoteserver.com)上进行处理,并返回响应

is just a hyperlink. 只是一个超链接。

There's probably more to it than that though. 但是,可能还有更多。 Explain and we'll try to help. 说明一下,我们将尽力提供帮助。

I'll elaborate and furthermore explain that I am not making one of those 'annoying' webservices that turns resourceful information into a clunky billboard. 我将详细说明并进一步说明,我并不是在做那些使资源丰富的信息变成笨拙的广告牌的“烦人” Web服务之一。 I intend on making a low graphic (16x16 icons at most per menu option) resource linking tool that can be used to connect resources on the local server to other resources, whether local or remote. 我打算制作一个低图形的资源链接工具(每个菜单选项最多16x16图标),该工具可用于将本地服务器上的资源连接到其他本地或远程资源。

This data would be accessed by sending a request to my webserver and returning a response in a popup box (this response would be based on the query of course) The response would be displayed in a brief menu of options, for example Wikipedia entries, links to torrent searches on popular engines, etc. 通过向我的Web服务器发送请求并在弹出框中返回响应(此响应将基于课程的查询)来访问此数据。响应将显示在选项的简短菜单中,例如Wikipedia条目,链接在流行的引擎等上激流搜索。

It won't be inhibitive of selecting, scrolling, clicking predefined hyperlinks, or anything, as you would need to hover the text for a few seconds. 它不会抑制选择,滚动,单击预定义的超链接或其他任何操作,因为您需要将文本悬停几秒钟。

I'm just looking for resources that would be helpful in designing such a service. 我只是在寻找有助于设计此类服务的资源。

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

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