PHP的数字验证码(Numeric Captcha for PHP)

是否有可用于PHP数字验证码?

不依赖于JavaScript的开启


编辑:

  • 我知道那里有JS独立验证码。
  • 我知道那里有PHP验证码。
  • 我知道那里有数字验证码。

但我正在寻找一个PHP数字与Javascript无关的验证码。
我发现的唯一数字验证码是用于ASP.NET或基于jQuery / JS的。
我不希望这些问题中的任何一个作为答案。

而我在这里并没有考虑一个小型网站。 在答案中,我想知道你的建议是否会给服务器带来很大的压力。


Is there a numeric captcha available for PHP?

(which doesn't rely on JavaScript being turned on)


EDIT:

  • I know there are JS-independent captchas out there.
  • I know there are PHP captchas out there.
  • I know there are numeric captchas out there.

But I'm looking for a PHP numeric Javascript-independent captcha.
The only numeric captcha's I've found are either for ASP.NET or jQuery/JS based ones.
I don't want any of those as an answer to the question.

And I'm not taking about a small website here. In the answer I'd like to know whether your suggestion puts a lot of strain on the server or not.


原文:https://stackoverflow.com/questions/6041555
2021-08-01 07:08

满意答案

将连接字符串放在某种配置文件(xml或ini或其他)中是有用的,以防您将数据库移动到另一台服务器或更改登录凭据等等...

如果你认为你永远不需要这个并且喜欢重建和重新部署你的应用程序,那么不,你不需要任何带有连接字符串的xml配置文件。

如果您担心安全性,可以将其保存在加密的xml文件中,然后解密它。

连接字符串和配置文件

加密app.config中的连接字符串


It's useful to put your connection string in some kind of config file (xml or ini or whatever) in case you move your database to another server or you change your login credentials and so on...

if you think you'll never need this and prefer to rebuild and redeploy your application, then no, you don't need any xml configuration file with the connection string in it.

If you're worried about security you could keep it in the xml file encrypted and then decrypt it runtime.

Connection Strings and Configuration Files

Encrypt connection string in app.config

相关问答

更多

在spring xml配置中连接字符串(Concatenate string in spring xml configuration)

你可以使用Spring-EL和factory-method : <bean id="localhost" class="java.net.InetAddress" factory-method="getLocalHost" /> <bean id="publishedUrl" class="java.lang.String"> <constructor-arg value="#{'http://' + localhost.hostName + '/Foo'}" /> </bean> <...

XML字符串到XML文档(XML string to XML document)

这个代码示例来自于cslarp-examples.net ,由Jan Slama编写: 要查找XML文件中的节点,可以使用XPath表达式。 方法XmlNode.SelectNodes返回由XPath字符串选择的节点列表。 方法XmlNode.SelectSingleNode找到与XPath字符串匹配的第一个节点。 XML: <Names> <Name> <FirstName>John</FirstName> <LastName>Smith</LastNam...

如何将字符串转换为xml(How to convert string to xml)

说theString拥有XML, DocumentBuilderFactory dbfac = DocumentBuilderFactory.newInstance(); DocumentBuilder docBuilder = dbfac.newDocumentBuilder(); Document doc = docBuilder.parse(new InputSource(new StringReader(theString))); 更多信息...

从XML文件中获取部分连接字符串(Taking part of connection string from XML file)

错误 Unable to complete network request to host "Port=3050" cstr的细分 "DataSource=" + globals.serv + "Port=3050;" + 这意味着globals.serv只是一个空字符串。 根本原因是serv_check()在cstr initialize和cstr未更新之后运行。 如果你需要更改globals.serv,你还需要更新cstr或者只需要创建一个新的readonly属性(注意添加DataSour...

如何从hibernate.cfg.xml文件获取连接字符串值?(How to get the connection string value from hibernate.cfg.xml file?)

尝试这个 NHibernate.Cfg.Configuration cfg = new NHibernate.Cfg.Configuration().Configure(); string conString = cfg.Configuration.GetProperty(NHibernate.Cfg.Environment.ConnectionString); try this NHibernate.Cfg.Configuration cfg = new NHibernate.Cfg.Conf...

XML中真的需要连接字符串吗?(Connection string really needed in XML?)

将连接字符串放在某种配置文件(xml或ini或其他)中是有用的,以防您将数据库移动到另一台服务器或更改登录凭据等等... 如果你认为你永远不需要这个并且喜欢重建和重新部署你的应用程序,那么不,你不需要任何带有连接字符串的xml配置文件。 如果您担心安全性,可以将其保存在加密的xml文件中,然后解密它。 连接字符串和配置文件 加密app.config中的连接字符串 It's useful to put your connection string in some kind of config fil...

从XML文件读取连接字符串(Read a connection string from a XML file)

我错过了什么? 是。 .NET有一个内置的机制来存储你的连接字符串,在一个App.config文件中,没有理由手动存储它并自己解析它。 右键点击你的项目,进入添加 - >新建项目 然后,添加一个“应用程序配置文件”: 一旦打开,向它添加一个connectionStrings节点,如下所示: // This is an example of a connectionString node. You may add child // values to it as follows <connectio...

如何保护我的连接字符串?(How to secure my connection string? powershell + xml)

我在Powershell中看到了两种用于加密的方法 使用* SecureString cmdlet 。 应该注意,只有加密了原始字符串的Windows ID才能解密它(因为它使用Windows登录名作为密钥) 使用密码短语和Library-StringCrypto函数 由于第一种方法的局限性,我使用第二种方法。 然后,我会将加密的连接字符串存储在SQL表中并锁定权限。 为了建立连接,我将从SQL表中检索连接字符串,并使用密码短语进行解密。 There are two methods I've se...

如何在Java中连接后设置XML字符串?(How to set XML string after concat'ing in Java?)

我担心你要做的事情不起作用。 当布局膨胀时,字符串的使用方式与资源文件中的定义完全相同。 为此,您必须明确设置文本,即 setContentView(R.layout.activity_home); TextView tv = (TextView)findViewById(R.id.theId); tv.setText(text); 其中“theId”是您必须在xml文件中为TextView设置的ID,例如: <TextView android:id="@+id/theId" a...

需要XML路径(XML Path needed)

使用以下xpath表达式: /bookstore/book[@category="CHILDREN" and year>2003]/*[name()="author" or name()="title"] 在这里,我们选择每个category属性等于CHILDREN且year节点值超过2003书籍。 *[name()="author" or name()="title"]有助于仅选择特定的子项: author和title 。 使用xmllint工具进行演示: $ xmllint input.xm...

相关文章

更多

PHP简介

PHP PHP是运行在服务器端的脚本,可以运行在UNIX、LINUX、WINDOWS、Mac OS下 ...

php匹配问题

文章内容:我是中国人,我喜欢上javaeye 填写的标签:中国 显示的效果是:我是 &lt;a h ...

Solr PHP support

Solr PHP support Contents Solr PHP support ...

php solr 扩展

安装php的solr扩展 下载地址: http://pecl.php.net/get/solr w ...

PHP中的替代语法

今天看了一下wordpress的代码,里面有些少见的php替代语法, &lt;?php else ...

PHP和javascript,谁更容易调试??

想请教对二者都熟悉的朋友,要做web,业务逻辑不很复杂,但要求WEB界面比较精美,如何选择呢?个人觉得 ...

PHP 页面多个Action 的处理

一个页面 放了很多 type=submit 的 Form表单。每一个对应不同的后台(需要调用计算程序, ...

my php & mysql FAQ

php中文字符串长度及定长截取问题使用str_len(&quot;中国&quot;) 结果为6,php ...

solr安装以及php调用

背景:项目中需要将原有的sphinx搜索引擎换成solr,以下是通过参照网络内容后,从搭建到调用的一次 ...

php面试题一

1、有一个word.txt文件,里边存的是类似于单词库(英语),一个单词独占一行。然后让你写一个长须实 ...

最新问答

更多

获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)

我用Google搜索了一个解决方案。 “EnumDisplayModeProvider”是我自己设置网站的各种模式的枚举。 public EnumDisplayModeProvider GetDisplayModeId() { foreach (var mode in DisplayModeProvider.Instance.Modes) if (mode.CanHandleContext(HttpContext)) {

如何通过引用返回对象?(How is returning an object by reference possible?)

这相对简单:在类的构造函数中,您可以分配内存,例如使用new 。 如果你制作一个对象的副本,你不是每次都分配新的内存,而是只复制指向原始内存块的指针,同时递增一个也存储在内存中的引用计数器,使得每个副本都是对象可以访问它。 如果引用计数降至零,则销毁对象将减少引用计数并仅释放分配的内存。 您只需要一个自定义复制构造函数和赋值运算符。 这基本上是共享指针的工作方式。 This is relatively easy: In the class' constructor, you allocate m

矩阵如何存储在内存中?(How are matrices stored in memory?)

正如它在“熵编码”中所说的那样,使用Z字形图案,与RLE一起使用,在许多情况下,RLE已经减小了尺寸。 但是,据我所知,DCT本身并没有给出稀疏矩阵。 但它通常会增强矩阵的熵。 这是compressen变得有损的点:输入矩阵用DCT传输,然后量化量化然后使用霍夫曼编码。 As it says in "Entropy coding" a zig-zag pattern is used, together with RLE which will already reduce size for man

每个请求的Java新会话?(Java New Session For Each Request?)

你是如何进行重定向的? 您是否事先调用了HttpServletResponse.encodeRedirectURL()? 在这里阅读javadoc 您可以使用它像response.sendRedirect(response.encodeRedirectURL(path)); The issue was with the path in the JSESSIONID cookie. I still can't figure out why it was being set to the tomca

css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)

我认为word-break ,如果你想在一个单词中打破行,你可以指定它,这样做可以解决问题: .column { word-break:break-all; } jsFiddle演示。 您可以在此处阅读有关word-break属性的更多信息。 I think word-break, with which you can specify if you want to break line within a word, will do the trick: .column { word-break

无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)

我认为您忘记在分类时间内缩放输入图像,如train_test.prototxt文件的第11行所示。 您可能应该在C ++代码中的某个位置乘以该因子,或者使用Caffe图层来缩放输入(请查看ELTWISE或POWER图层)。 编辑: 在评论中进行了一次对话之后,结果发现在classification.cpp文件中错误地删除了图像均值,而在原始训练/测试管道中没有减去图像均值。 I think you have forgotten to scale the input image during cl

xcode语法颜色编码解释?(xcode syntax color coding explained?)

转到: Xcode => Preferences => Fonts & Colors 您将看到每个语法高亮颜色旁边都有一个简短的解释。 Go to: Xcode => Preferences => Fonts & Colors You'll see that each syntax highlighting colour has a brief explanation next to it.

在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)

你考虑过第三方拼写检查吗? 您可以将在C#中开发的自定义WinForms控件插入访问数据库吗? VB6控件怎么样? 如果你能找到一个使用第三方库进行拼写检查的控件,那可能会有效。 Have you considered a third party spell checker? Can you insert a custom WinForms controls developed in C# into an access database? What about a VB6 control? If

从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)

我有同样的问题,因为我在远程服务器上有两个图像,我需要在每天的预定义时间复制到我的本地服务器,这是我能够提出的代码... try { if(@copy('url/to/source/image.ext', 'local/absolute/path/on/server/' . date("d-m-Y") . ".gif")) { } else { $errors = error_get_last(); throw new Exception($err

从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))

我不确定我完全明白你在说什么。 你能编辑你的帖子并包含你正在做的Subversion命令/操作的特定顺序吗? 最好使用命令行svn客户端,以便容易为其他人重现问题。 如果您只是想获取文件的旧副本(即使该文件不再存在),您可以使用如下命令: svn copy ${repo}/trunk/moduleA/file1@${rev} ${repo}/trunk/moduleB/file1 其中${repo}是您的存储库的URL, ${rev}是您想要的文件的版本。 这将恢复该文件的旧版本,包括最高版本