Recently, I am engaged in development, and I am also reading php code, but I still use the c # language. recently I am engaged in development, and I am also reading php code, however, I still use the c # language;
The index. ashx file is created in the background, which is faster;
First, the top references
Using System. IO;Using System. Xml;
One is to receive xml file streams, and the other is to process xml files later;
Public class index: IHttpHandler {private readonly string Token = "xxxx"; /
First, you need to learn the access materials. here, because the principles are all there, you must carefully read the information. Then, use Delphi to implement a corresponding function and then apply for an account for public platform interface testing. First, you need to learn the connected materials. Http://mp.weixin.qq.com/debug/cgi-bin/sandbox? T = sandbox/login
Function CheckSignature (const signature, timestamp, nonce, token: string): boolean
, and then add the corresponding route.
The Token must be consistent with the token on our custom server. After entering the information, click Submit. Before submitting, we start app. js (Click Submit to run ]). In this way, we can verify whether the signature is valid based on our route match.
After the configuration is complete, you must enable the configuration.
Website access
After a public platform user submits information, the server sends a GET request to the URL filled in with four par
code, then looks the garden friend's demo, has the database, is. db3 suffix, needs to install Shartplus Sqlit, the secret type and the length set wrong, set to Binnary 32 bit, no longer reported this wrong.Question five: Error an exception of type ' System.Data.Entity.Validation.DbEntityValidationException ' occurred in EntityFramework.dll but is not handled in user codeDemo database comparison, found to be the nonce table, I set up a joint primary k
= Rootelement.selectsinglenode ("Createtime"). InnerText;
Requestxml.msgtype = Msgtype.innertext;
Different processing according to different types
Switch (requestxml.msgtype)
{
Case "text"://Text message
Requestxml.content = Rootelement.selectsinglenode ("Content"). InnerText;
Break
Case "image"://Picture
Requestxml.picurl = Rootelement.selectsinglenode ("Picurl"). InnerText;
Break
Case "Location"://Position
requestxml.location_x = Rootelement.selectsinglenode ("location_x"). Inn
parity) has been deployed on your computer and connected to the Ethernet block chain network (testnet or mainnet) to invoke the function in the contract through the contract address and the contract ABI. Call the Voteforcandidate function after you get the contract object. building the original transaction object
The initial transaction is first generated after the Voteforcandidate function is invoked:
Txncount = Web3.eth.getTransactionCount (web3.eth.accounts[0])
var rawtxn = {
Nonce:web3.
Piccgenesis.json, enter the following and save
{
"Nonce": "0x0000000000000042",
"Mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"Difficulty": "0x4000",
"Alloc": {},
"Coinbase": "0x0000000000000000000000000000000000000000",
"Timestamp": "0x00",
"Parenthash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"Extradata": "0x888",
"Gaslimit": "0xFFFFFFFF"
}
Explain the function of each parameter:
own creation block is to distinguish the public chain, the same network, the creation of the block must be the same, or can not be connected, this method in Windows and Ubuntu under General.
New file Piccgenesis.json, enter the following and save
{
"Nonce": "0x0000000000000042",
"Mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"Difficulty": "0x4000",
"Alloc": {},
"Coinbase": "0x0000000000000000000000000000000000000000"
this is, just remember that it is actually a string symbol used to generate a signature representing your own identity ), enter the url of your website and click submit, as shown in.
The Platform sends a GET request to the website corresponding to the url, carrying four parameters at the same time. For more information about the parameters, see Figure 2. For example.
Timestamp is a timestamp. The timestamp is the total number of seconds from January 1, January 1, 1970 to the current time.
This article provides a detailed analysis of how to compile a php application to implement Digest Authentication. For more information, see basic identity authentication, you can also use the PHP web page to process HTTP request header fields to match Digest Authentication information. For example, the following code uses the header () function to require the client to use Digest for verification. It adds the WWW-Authenticate field to the HTTP message header:
Header ('www-Authenticate: Digest R
Similar to basic identity authentication, you can use PHP Web pages to process HTTP request header fields to match digest authentication information. For example, the following code uses the header () function to require the client to use Digest for verification. It adds the WWW-Authenticate field to the HTTP message header:Header ('www-Authenticate: Digest Realm = "MyRealm", nonce = "47alf7cf25ce7", algorithm = MD5, qop = "auth "');------------------
This article provides a detailed analysis of how to compile a php application to implement Digest Authentication. For more information, see basic identity authentication, you can also use the PHP web page to process HTTP request header fields to match Digest Authentication information. For example, the following code uses the header () function to require the client to use Digest for verification. It adds the WWW-Authenticate field to the HTTP message header:
Header ('www-Authenticate: Digest R
This article mainly introduces you to the complete development of php code, which has some reference value. interested partners can refer to the examples in this article to share with you the development of php code, for your reference, the specific content is as follows:
Appid = $ appid; $ this-> appsecret = $ appsecret;} // verify the server address validity. public function valid () {if ($ this-> checkSignature ()) {$ echostr = $ _ GET ['chostr']; // random string return $ echostr;} else {r
code see the interface section, 1.5 to retrieve the returned result data processing; 2, security authentication All private APIs need to be authenticated to the API application can go to the Finance Center, API, request for private key and public key, private key Jubi will not be stored, once lost will not be retrieved Note: Do not disclose these two parameters to anyone, which is as important as your password 2. Signing mechanism Each request for the private API requires a signat
.
Shows the data sent:
Data is a base64-encoded piece of data. After decoding, it is1
ci=YToyOntzOjEyOiJjb250ZW50X3R5cGUiO3M6NDoiaG9tZSI7czo4OiJjYXRlZ29yeSI7czowOiIiO30=.ae93e0c4e2f76695c4dd540456ab7945ref=res=aHR0cDovLzEwLjE4LjE4MC4zNy93b3JkcHJlc3Mvsw=1920sh=1080cd=24aa=1sl=2004pp=7267pl=flash|
We directly go to the plug-in file to see how the plug-in processes the data.
In line 2 of the wp-content \ plugins \ wp-slimstatwp-slimstat.php File
We can see that the data is passed to $ data_strin
, the length of the message, and some fixed fields. The load is: different types, representing different meanings. Typical loads are described below (excerpt from RFC) Notation Payload ----------------------------------------- AUTH authentication CERT Certificate certreq Certificate Request CP Configuration D Delete EAP Extensible Authentication HDR IKE Header (not a payload) IDi Identific ation - initiator IDr identification - Responder KE Key Exchange Ni, Nr
Basic identity authentication, you can also use the PHP Web page to process HTTP request header fields to match Digest authentication information. For example, the following code uses the header () function to require the client to use Digest authentication, which adds a www-authenticate field to the HTTP message header:
header (' www-authenticate:digest realm= ' Myrealm ', nonce= ' 47alf7cf25ce7 ', algorithm=md5,qop= ' auth ');----------------------
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.