PHP Crul simulates get request.net api interface prompts that the requested resource is not found
Sanys
Sanys 2019-09-20 17:45:17
0
0
1068
function get($url)
	{
		  $curl = curl_init(); // 启动一个CURL会话
		    curl_setopt($curl, CURLOPT_URL, $url);
		    curl_setopt($curl, CURLOPT_HEADER, 0);
		    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
		    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); // 跳过证书检查
		    curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);  // 从证书中检查SSL加密算法是否存在
		    $output = curl_exec($curl);     //返回api的json对象
		    //关闭URL请求
		    curl_close($curl);
		    return $output;    //返回json对象
		
	}

If the get request is a json format parameter, should it stay in the url or how to send the data

Sanys
Sanys

reply all(0)
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template