Move z_fetch_url

move z_fetch_url method
This commit is contained in:
Adam Magness 2018-01-26 23:18:38 -05:00
parent c67452f72e
commit 2f9642392d
14 changed files with 58 additions and 60 deletions

View file

@ -281,7 +281,7 @@ class DiscoverPoCo {
$url = "http://gstools.org/api/users_search/".urlencode($search);
$result = z_fetch_url($url);
$result = Network::zFetchURL($url);
if (!$result["success"]) {
return false;
}

View file

@ -10,6 +10,7 @@ use Friendica\Database\DBM;
use Friendica\Model\Contact;
use Friendica\Protocol\Email;
use Friendica\Protocol\PortableContact;
use Friendica\Util\Network;
use dba;
require_once 'include/dba.php';
@ -176,7 +177,7 @@ class OnePoll
. '&type=data&last_update=' . $last_update
. '&perm=' . $perm ;
$ret = z_fetch_url($url);
$ret = Network::zFetchURL($url);
if ($ret['errno'] == CURLE_OPERATION_TIMEDOUT) {
// set the last-update so we don't keep polling
@ -311,7 +312,7 @@ class OnePoll
}
$cookiejar = tempnam(get_temppath(), 'cookiejar-onepoll-');
$ret = z_fetch_url($contact['poll'], false, $redirects, ['cookiejar' => $cookiejar]);
$ret = Network::zFetchURL($contact['poll'], false, $redirects, ['cookiejar' => $cookiejar]);
unlink($cookiejar);
if ($ret['errno'] == CURLE_OPERATION_TIMEDOUT) {