WordPress real wechat public account verification code viewing plug-in

» WordPress » WordPress real wechat public account verification code viewing plug-in

When you see the title, many people will say that this function has been available for a long time. Why send this article? Yunluo certainly won't take the previous function to write. Today's writing is not a real public number verification code viewing function, which is a function that comes to mind when I sleep in bed.

WordPress真微信公众号验证码查看插件-极客公园

thinking

First of all, let's briefly talk about the design idea. The public number verification code is visible. First, we should design a verification code. The verification code must be unique and has an expiration date. From this point, the visible function of these public number verification codes circulated on the Internet is actually fake, because the verification code is set manually and is a fixed character, You'll know after you use it once.

The first method I think of is to use a public captcha pool, that is, generate some captcha at one time, put them in a TXT file, and then call them randomly. After reading the file, they form an array, and then call out the captcha from the array. After this method is implemented, after thinking about it, I find that although it can achieve the functions I need, it can't be used, After all, this is equivalent to the direct disclosure of captcha, so this method was eliminated and another captcha method was redesigned.

Captcha design

The redesigned captcha scheme is based on time, domain name and wechat token. In terms of time, the unit is 1 hour. There are 60 verification codes per minute. For example, 13-12 is 12. The verification code can be simply set to 12. If you need to change the verification code every 2 minutes, divide the current number of minutes by 2, and so on. Concatenate the website domain name with the current minute string, such as 12 https://gitcafe.net In addition, the wechat public number token is spliced into [12 https://gitcafe.netweixintoken 】Later, we will encrypt it and use the SHA1 method to calculate a 40 bit string. We will intercept 6 bits of it as the verification code, and then add the date. For example, today is 2-18, Then we will intercept 6 as a string from the 18th to ensure that the verification code does not repeat in 30 days of a month. Finally, this 6-bit string can be sent to wechat public account as a verification code and used to verify whether the verification code entered on the web page is correct.

The verification code design is OK. The following is the connection to the wechat public account. Based on the public account example code, it is slightly changed, only the wechat class is reserved, and other codes are not required. Try it out, OK, no problem.

Wechat is ready, and then WordPress. Here, I'm going to talk about the code visible in the wechat public account verification code, which is popular on the Internet. So many times, it is a native form submission, and it will be repeatedly submitted after refreshing. Cloud down here a little change, change to Ajax to submit the actual experience will be better.

The code in this paper is not important. What's important is the design idea of captcha, which can also be designed where captcha is needed. In addition, this captcha has a small drawback: the expiration time is not calculated from the generation of captcha, but the captcha will expire with time. Therefore, if you get the captcha in 59 seconds, it will be invalid immediately, Of course, this is only a small drawback, do not hinder the use of expired verification code can be re applied.

Plug in description

Because it is a very simple plug-in, there is no background. There are two constants in the plug-in. One is wechat token, and the other is the QR code image of public number. The plug-in can be understood by opening a file. In addition, JS code uses jQuery
The other is that the administrator has no effect. If the administrator needs to view it, he needs to exit the account

Plug in download

--Over--

Comment

Your email address will not be disclosed. Required item used * tagging

58 replies to "WordPress wechat official account verification code viewing plug-in"

  1. Hello, my reply to the public account indicates that the service provided by the public account is out of order. Please try again later

  2. According to the requirements of the building owner, the configuration can work normally, but if the developer mode is turned on, the original menu and automatic reply will be taken over, and the menu cannot be customized without authentication subscription number.
    Now the background of the public account is connected to the micro engine, and the server address in the public account configuration has been changed. How to realize this function?

  3. How to deal with this mistake!
    Warning: simplexml_ load_ string(): Entity: line 1: parser error : Start tag expected, '<' not found in /www/wwwroot/ www.Xxxx.net/wp-content/plugins/wx/wx.php on line 68

  4. Token can't pass the verification code. The public number basically configures the URL. I don't know how to fill it in. I hope the boss can explain it more clearly

  5. After configuration, the verification code can also be received.
    The problem is to enter the verification code, always prompt error
    Verification code error

  6. This device has been deployed successfully, but why there is always an IP segment 150.138.138. * under attack, it has been guessing the password and failed to log in. If the IP end is blocked, the verification code function cannot be used, and the IP segment does not seem to belong to Tencent cloud or public number. All day long, the IP address failed to log in, and the user name was right... What's going on?

    1. @ A Bai Well, it is found that it is the node of Baidu cloud CDN ~. However, this takes over the menu and automatic reply, which is not easy to develop

  7. Configuration is successful, but enter the keyword "verification code", how can the public number not reply?

  8. If the wechat public account does not send the verification code, the public account will return. The service provided by the public account fails. Please try again later.

    See if you can handle this.

    1. @ stone This has no concern with the plug-in. With this plug-in, you have to learn to develop the rest of the reply, develop the menu bar, etc

  9. I have a problem. After the plug-in is enabled, my WP website chooses 21:50 when publishing articles, but it becomes 13:50 when it is published. The time is 8 hours slow. How can I solve this problem? The time of closing this plug-in is normal

  10. It's really good. It's just that the number of verification codes is a little long. Can I ask Yunluo brother to change it

  11. I filled in the relevant information in the [server configuration] of the wechat public account background, but prompted me [token verification failed], what should I do?

  12. What settings do you want to do in wechat public account?
    At present, I have obtained the token and modified the QR code image address of the public number. The WP background has enabled the plug-in, but after trying with a small number, the public number will not automatically generate a verification code.

  13. Upload the compressed package directly to the plug-in installation, and the BT panel will prompt you that the submitted content contains dangerous attack requests

  14. The public number has been configured and Wx has been modified_ Token and wx_ QR, the public number also has the verification code. But the content on WD is not hidden. Do you know what may be the reason?

  15. This plug-in is really good. Compared with the old things a few years ago, or the new size is more reliable. It's a pity that there is no visual setting option. But what is Xiaobai doing with this?
    I reprinted this article at the following address: https://www.npc.ink/12091.html