How do I get a picture of my captcha when I sign in?

Source: Internet
Author: User
Login will have a verification code, read the code, its src point to a PHP address (may not be a PHP address, so src="/login/verificationCode?0.8308222951445625"), open this address alone, there is garbled, ask how can you pull this picture down? Prepare for the next identification verification code. Have you studied the relevant friends, thank you!

Reply content:

Login will have a verification code, read the code, its src point to a PHP address (may not be a PHP address, so src="/login/verificationCode?0.8308222951445625" ), open this address alone, there is garbled, ask how can this picture be keyed down? Prepare for the next identification verification code. Have you studied the relevant friends, thank you!

This is not garbled, just jpg, GIF, PNG binary stream only, specifically JPEG or PNG, need to see this binary stream of the first few, last there will be JPEG and other tags

This binary stream 1.jpg is saved so you can see the results.

Or, when requested, set Content-type to Image/jpeg so the request should be seen directly.

Suggest the main topic to see TP verification code generation to understand the Austrian righteousness

Verification Code

Encounter such a problem with

Add a header to the HTTP request to let the server know that it is a picture, you say the garbled is a binary stream, copied to. txt and then saved as. jpg and you can open it.

Generally, the generation of CAPTCHA images is not stored or cached.
Re-accessing the link will only generate a new image, so save the picture first and then make the call.

Previously in the project, we are through the JS call interface Way, the verification code picture of the binary stream resources to Base64_encode encryption to the client.
You can refer to the implementation method.

Did the landlord solve the problem? I'm also having this problem.

  • Related Article

    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.