Interface problem
The most important thing for php to call the interface is to use curl to grab information
Copy code Code As follows:
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url); //url address
curl_setopt($ch, CURLOPT_POST, true); / /Whether to post request
curl_setopt($ch, CURLOPT_POSTFIELDS, $data); //Data passed by post request
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);//Set header
curl_setopt($ch , CURLOPT_RETURNTRANSFER, true); //Return the obtained output text stream
$response = curl_exec($ch); //Get the returned data
curl_close($ch); //Close
http://www.bkjia.com/PHPjc/327969.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/327969.htmlTechArticleInterface problem The most important thing about calling the interface in php is to use curl to grab information. Copy the code. The code is as follows: $ch = curl_init( ); curl_setopt($ch, CURLOPT_URL, $url);//url address curl_setopt($ch,...