]> git.mxchange.org Git - friendica.git/blobdiff - mod/parse_url.php
fix redirection - works now with logged in users, remote users, guests and visitors
[friendica.git] / mod / parse_url.php
index 6fb404f1b052f9714d9afb9ff2f62c87872570b0..ea860f6d318016636f40af1387b842b1d1fe5da0 100644 (file)
@@ -12,6 +12,7 @@
 
 use Friendica\App;
 use Friendica\Core\Addon;
+use Friendica\Util\Network;
 use Friendica\Util\ParseUrl;
 
 require_once("include/items.php");
@@ -60,7 +61,7 @@ function parse_url_content(App $a) {
        // the URL with the corresponding BBCode media tag
        $redirects = 0;
        // Fetch the header of the URL
-       $result = z_fetch_url($url, false, $redirects, ["novalidate" => true, "nobody" => true]);
+       $result = Network::curl($url, false, $redirects, ["novalidate" => true, "nobody" => true]);
        if($result["success"]) {
                // Convert the header fields into an array
                $hdrs = [];