I also asked a question about the verification code.

Source: Internet
Author: User
I also asked a question about the verification code generated by php. The final result is that the last string is stored in the session and exists on the server side. what if the verification code exists on the client side, whether javascript can be used to load the verification code should be & lt; imgsrc = & quot; aaa. php & quot; & gt; aaa. php is a text that generates images. I also asked a verification code question.
Php code generation

In the final analysis, the last string is stored in the session,

On the server side,

If the verification code is stored on the client,

Can I use javascript for operations?

Load the verification code



Aaa. php is a file that generates images.

It seems that echo 'script document. getElementById... script '; does not seem to work ..

Who has new ideas?

------ Solution --------------------
If you pass the verification code value to the client, won't the user get it easily?
------ Solution --------------------
What do you want the verification code?
------ Solution --------------------
Then you can simply write a verification code using JS to relieve the pressure on the server...
------ Solution --------------------
If you do that, the verification code does not work.
------ Solution --------------------
Discussion
What do you want the verification code?

------ Solution --------------------
The verification code is used to prevent brute-force robot cracking.
If you pass the verification code value to the client, the robot can easily obtain it. In this case, isn't your verification code an empty one?
------ Solution --------------------
Your php has output the verification code. is it still called the client? Besides, you can only add a token in this way. we often do this. this is not a verification code.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.