允许用户将代码复制并粘贴到自己的网站中 [英] Allow users to copy and paste code into their own website

查看:111
本文介绍了允许用户将代码复制并粘贴到自己的网站中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经用PHP和MySQL开发了一个Web应用程序.我已经搁置了一段时间的系统的一部分是,允许我的用户在我的应用程序内创建一个简单的表单,完成后,将我生成的一些代码复制并粘贴到现有的代码中远程网站(IE:联系表格)应出现在该网站上.

当网站访问者将其数据输入该联系表"或他们创建的任何内容时,它应将信息保存到我的应用程序数据库中,以便用户可以访问它.它必须不引人注目.

I''ve developed a web application in PHP and MySQL. One part of the system I''ve been putting on hold for a while now, is allowing my users to create a simple form inside my application, and once they''re done, copy and paste some code which I generate into their existing remote websites (IE: Contact Form) where this form should appear.

When visitors to their site enter their data into that "contact form" or whatever they''ve created, it should save the info into my application database where the users will be able to access it. It must be unobtrusive.

Is there anyone who can give me a good starting point on how to achieve this?

推荐答案

您不能只是将表单元素复制并粘贴到某人中"的Web应用程序.有许多因素需要考虑.例如,您如何发布到服务器?如果页面上还有其他表格怎么办?如果所使用的框架不支持多种形式,如ASP.NET,该怎么办?跨站点脚本怎么办?另一个主机是否允许此类通信?

一般来说,我会认为这是一个糟糕的设计.
You can''t just copy and paste a form element into someone''s web application. There are a number of factors to take into consideration. For instance, how are you posting to your server? What if there are other forms on the page? What if the framework being used doesn''t support multiple forms, such as ASP.NET. What about cross-site scripting? Does the other host allow such communications?

In general I would consider it a bad design.


这篇关于允许用户将代码复制并粘贴到自己的网站中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆