About the php interface (the php interface mainly uses the curl and curl functions ). Interface problems the most important php interface is to use curl to capture information and copy the code as follows: $ chcurl_init (); curl_setopt ($ ch, CURLOPT_URL, $ url); url address curl_setopt ($ ch,
Interface Problems
The most important thing to call php interfaces is to use curl to capture information.
The code is as follows:
$ Ch = curl_init ();
Curl_setopt ($ ch, CURLOPT_URL, $ url); // url
Curl_setopt ($ ch, CURLOPT_POST, true); // whether to post the request
Curl_setopt ($ ch, CURLOPT_POSTFIELDS, $ data); // data transmitted by the post request
Curl_setopt ($ ch, CURLOPT_HTTPHEADER, $ header); // Set the header
Curl_setopt ($ ch, CURLOPT_RETURNTRANSFER, true); // return the obtained output text stream
$ Response = curl_exec ($ ch); // Obtain the returned data
Curl_close ($ ch); // Close
The main method for calling the php interface is to use curl to capture information. the code is as follows: $ ch = curl_init (); curl_setopt ($ ch, CURLOPT_URL, $ url ); // url curl_setopt ($ ch ,...