Front and Back End Key Allocation Verification

Each time this page is opened, the backend generates a certificate based on Session if(!isset($_SESSION['key_pub'])){ $rsa_model=new \Home\Library\Org\Util\Rsa(); $_SESSION['key_pub']=$rsa_model->privateKey; $_SESSION['key_pri']=$rsa_model->privateKey; } $this->assign("pub_token",$_SESSION['key_pub' ...

Posted by synapp2 on Sat, 14 Mar 2020 09:33:32 -0700

Use jQuery for e-mail validation

I'm new to jQuery and want to know how to use it to verify email addresses. #1st floor I would recommend Verimail.js And it also has one JQuery Plugin . Why?Verimail supports the following: Syntax validation (according to RFC 822) IANA TLD Validation Spelling suggestions for the most common TLD and e-mail domains Deny ...

Posted by sfullman on Thu, 12 Mar 2020 19:33:35 -0700

Sword point data warehouse Shell command three

1, Last course review 2, Linux basic command 3 2.1 users and user groups 2.2. Use of personal environment variables (. Selection of bashrc and. Bash? Profile) and global environment variables (/ etc/profile) and aliases 2.3 use of history command 2.4 use of delete command Three. Homework 1, Last cour ...

Posted by Arsench on Thu, 12 Mar 2020 03:15:32 -0700

Thinking about the pconnect long link of PHP redis

Throw question Some time ago, a big guy said that PHP redis's pconnect can't realize long links. After the request ends, the connection is released. I have doubts in my mind. If so, why does PHP redis have connect and pconnect? Search document The connection will not be closed on end of request un ...

Posted by NightCoder on Thu, 12 Mar 2020 01:23:19 -0700

The general interface of psr/log log database

https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md composer require psr/log Log interface specification In this paper, the general interface specification of log class library is established. The main purpose of this specification is to make the log class library record log information by receiving a Ps ...

Posted by mark_18 on Wed, 11 Mar 2020 23:05:21 -0700

Can I try / catch warnings?

I need to catch some warnings thrown from PHP native functions and process them. Especially: array dns_get_record ( string $hostname [, int $type= DNS_ANY [, array &$authns [, array &$addtl ]]] ) When a DNS query fails, it will raise a warning. try / catch does not work because warnings are no exception. I now have t ...

Posted by triphis on Wed, 11 Mar 2020 21:10:30 -0700

Hyperf / websocket server / client and server real-time two-way data transmission

WebSocket service WebSocket is a kind of communication protocol, which can carry out full duplex communication on a single TCP connection. WebSocket makes the data exchange between the client and the server easier, allowing the server to actively push data to the client. In WebSocket API, browser and server only need to complete one handshake, ...

Posted by rawky1976 on Tue, 10 Mar 2020 21:06:02 -0700

php implementation of websocket real-time message push

1, Brief introduction of socket protocol What is WebSocket and what are its advantages WebSocket is a persistent protocol, which is relative to http non persistent. Application layer protocol For example, the life cycle of http1.0 is defined by request, that is, a request and a response. For HTTP, this session between client and server ends ...

Posted by edontee on Tue, 10 Mar 2020 03:01:08 -0700

Install SSL certificate on Apache server

The premise is that you buy the certificate first, download it, and open the certificate compression package with 3 files in total   Certificate file: with. crt as the suffix or file type. Certificate chain file: with. crt as the suffix or file type. key file: with. key as the suffix or file type.   Create a new cert directory in the Apache ...

Posted by dc277 on Tue, 10 Mar 2020 02:08:13 -0700

CSRF (Cross Site Request Forgery) Cross Site Request Forgery

0. Preface CRSF is based on session, which sounds like XSS cross site scripting attack, but in fact, the attack mode is totally different. When I wrote XSS, I mentioned that many websites would use cookie s to save the login information of users. For example, when I finished using CSDN last night, I c ...

Posted by Kryllster on Mon, 09 Mar 2020 22:06:02 -0700