The other party said they used asihttp and post. So can I receive it directly? Also, how can I check whether I have received the data from someone else's post or whether someone else has sent the data? {Code...} the other party said they were using asihttp and post.
So can I receive it directly? Also, how can I check whether I have received the data from someone else's post or whether someone else has sent the data?
Reply content:
The other party said they used asihttp and post.
So can I receive it directly? Also, how can I check whether I have received the data from someone else's post or whether someone else has sent the data?
No. The key-value pair of the key value must be post to read $ _ POST.
$ Raw = file_get_contents ("php: // input", "r ");
Accept any form of post data
This is the php language. It will be executed only when a post is submitted. So you need to know if someone else is post.
If you want to know how to verify whether the data submitted by your app is correct, you can use the signature method to verify the data.
As long as there is no problem with the network connection, the data sent by the app to send the post request can be directly obtained in php. Check whether the received data is transmitted by checking whether the received data is null.
First, I have a few questions about the landlord's code:
$ Json = json_decode [$ json, true]. What is json_decode for the array?
Mysql_close ();
As long as the other party uses the post method of http, you can accept it with post. You can try to use
If (empty ($ _ POST ['username']) {
Exit ('username can not be empty ');
}
For testing.
View nginx logs and return http status.