<div dir="ltr">So \OCA\AppFramework\Core\API::getUrlContent($url) also have the same:<br>public function getUrlContent($url) {<br>ššš return \OC_Util::getUrlContent($url);<br>}<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">
2013/7/30 íÁËÓÉÍ íÉÎÞÕË <span dir="ltr"><<a href="mailto:maxim.minchuk@gmail.com" target="_blank">maxim.minchuk@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<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 style="line-height:normal;text-indent:0px;border-collapse:separate;letter-spacing:normal;font-variant:normal;text-transform:none;font-size:medium;font-style:normal;white-space:normal;font-weight:normal;word-spacing:0px"><span 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 style="line-height:normal;text-indent:0px;border-collapse:separate;letter-spacing:normal;font-variant:normal;text-transform:none;font-size:medium;font-style:normal;white-space:normal;font-weight:normal;word-spacing:0px"><span 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 style="line-height:normal;text-indent:0px;border-collapse:separate;letter-spacing:normal;font-variant:normal;text-transform:none;font-size:medium;font-style:normal;white-space:normal;font-weight:normal;word-spacing:0px"><span 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 style="line-height:normal;text-indent:0px;border-collapse:separate;letter-spacing:normal;font-variant:normal;text-transform:none;font-size:medium;font-style:normal;white-space:normal;font-weight:normal;word-spacing:0px"><span style="font-size:15px">Or some specific exception type.<br>

</span></span></span></div><span style="font-family:arial,helvetica,sans-serif"><span style="line-height:normal;text-indent:0px;border-collapse:separate;letter-spacing:normal;font-variant:normal;text-transform:none;font-size:medium;font-style:normal;white-space:normal;font-weight:normal;word-spacing:0px"><span 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 style="line-height:normal;text-indent:0px;border-collapse:separate;letter-spacing:normal;font-variant:normal;text-transform:none;font-size:medium;font-style:normal;white-space:normal;font-weight:normal;word-spacing:0px"><span 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 style="line-height:normal;text-indent:0px;border-collapse:separate;letter-spacing:normal;font-variant:normal;text-transform:none;font-size:medium;font-style:normal;white-space:normal;font-weight:normal;word-spacing:0px"><span 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 style="line-height:normal;text-indent:0px;border-collapse:separate;letter-spacing:normal;font-variant:normal;text-transform:none;font-size:medium;font-style:normal;white-space:normal;font-weight:normal;word-spacing:0px"><span 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>
</blockquote></div><br></div>