]> git.mxchange.org Git - friendica.git/blobdiff - include/bbcode.php
Added some more timestamp measuring
[friendica.git] / include / bbcode.php
index 7e9dcf3badbb403f4c6799fcbbb8aebf57754ee6..1f6a315531ce956e0ac092bcc1cacec2854b84f7 100644 (file)
@@ -681,6 +681,8 @@ function bb_RemovePictureLinks($match) {
        if(is_null($text)){
                $a = get_app();
 
+               $stamp1 = microtime(true);
+
                $ch = @curl_init($match[1]);
                @curl_setopt($ch, CURLOPT_NOBODY, true);
                @curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
@@ -688,6 +690,8 @@ function bb_RemovePictureLinks($match) {
                @curl_exec($ch);
                $curl_info = @curl_getinfo($ch);
 
+               $a->save_timestamp($stamp1, "network");
+
                if (substr($curl_info["content_type"], 0, 6) == "image/")
                        $text = "[url=".$match[1]."]".$match[1]."[/url]";
                else {
@@ -731,6 +735,8 @@ function bb_CleanPictureLinksSub($match) {
        if(is_null($text)){
                $a = get_app();
 
+               $stamp1 = microtime(true);
+
                $ch = @curl_init($match[1]);
                @curl_setopt($ch, CURLOPT_NOBODY, true);
                @curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
@@ -738,6 +744,8 @@ function bb_CleanPictureLinksSub($match) {
                @curl_exec($ch);
                $curl_info = @curl_getinfo($ch);
 
+               $a->save_timestamp($stamp1, "network");
+
                // if its a link to a picture then embed this picture
                if (substr($curl_info["content_type"], 0, 6) == "image/")
                        $text = "[img]".$match[1]."[/img]";