This time I will bring you a detailed explanation of the steps for php curl to obtain the return value. What are the precautions for php curl to obtain the return value? The following is a practical case, let's take a look.
php curl implementation method of getting the return value在curl中有一个参数 curlopt_ return transfer :
curl_setopt($ch, curlopt_returntransfer, 0);
Fortunately, curlopt_returntransfer can be set. If it is set to curlopt_returntransfer 1:
curl_setopt($ch, curlopt_returntransfer, 1);
to get the server return value. . It is
string type!
curl_multi_getcontent( resource $ch )
function will return the content obtained by that curl handle in the form of a string.
I believe you have mastered the method after reading the case in this article. For more exciting information, please pay attention to other related articles on the php Chinese website! Recommended reading:array_combine() array merge function usage case details
The above is the detailed content of Detailed explanation of steps to obtain return value with php curl. For more information, please follow other related articles on the PHP Chinese website!