- //http request interface
- function curl_http_request($param,$url)
- {
- $ch = curl_init();
- $curl_url = $url."?".$param;
- curl_setopt($ch, CURLOPT_URL , $curl_url);
- curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE); //Disable certificate
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
- curl_setopt ($ch, CURLOPT_HEADER, 0); //Header file information for data flow Output
- curl_setopt($ch, CURLOPT_POST, 1);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);//Do not output directly, return to variable
- $curl_result = curl_exec($ch);
- curl_close($ch);
-
- return $curl_result;
- }
Copy code
|