<div dir="ltr"><div><div><div><div><div><div><div>I use OC_Util::getUrlContent for <span style="font-family:arial,helvetica,sans-serif"><span class="" style="border-collapse:separate;color:rgb(0,0,0);font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><span class="" style="font-size:15px">retrieving data from another server. This method always return false and i don't know why it happens beacuse method only returns $data.<br>
<br></span></span></span></div><span style="font-family:arial,helvetica,sans-serif"><span class="" style="border-collapse:separate;color:rgb(0,0,0);font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><span class="" style="font-size:15px">Maybe it will be usefull to return an exception if there is error in response?<br>
</span></span></span></div><span style="font-family:arial,helvetica,sans-serif"><span class="" style="border-collapse:separate;color:rgb(0,0,0);font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><span class="" style="font-size:15px">Like this:<br>
$data = curl_exec($curl);<br>if (false === $data){<br> throw new Exception(curl_error($curl), curl_errno($curl));<br>}<br></span></span></span></div><span style="font-family:arial,helvetica,sans-serif"><span class="" style="border-collapse:separate;color:rgb(0,0,0);font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><span class="" style="font-size:15px">Or some specific exception type.<br>
</span></span></span></div><span style="font-family:arial,helvetica,sans-serif"><span class="" style="border-collapse:separate;color:rgb(0,0,0);font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><span class="" style="font-size:15px">Only with this change i understand that i have another problem:<br>
"SSL certificate problem: unable to get local issuer certificate" in exception, because i have https url.<br></span></span></span></div><span style="font-family:arial,helvetica,sans-serif"><span class="" style="border-collapse:separate;color:rgb(0,0,0);font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><span class="" style="font-size:15px">I need have this in curl options:<br>
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);<br></span></span></span></div><span style="font-family:arial,helvetica,sans-serif"><span class="" style="border-collapse:separate;color:rgb(0,0,0);font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><span class="" style="font-size:15px">I don't send any passwords or user data, so i don't need any additional checks. But i can't change this method, only copy and paste it in my application.<br>
<br></span></span></span></div><span style="font-family:arial,helvetica,sans-serif"><span class="" style="border-collapse:separate;color:rgb(0,0,0);font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><span class="" style="font-size:15px">Maybe some part of this implement in standard OC_Util::getUrlContent, because only false in response little bit discouraged.<br>
</span></span></span></div>