]> _ Git - fluidbook-toolbox.git/commitdiff
wait #7825 @0:25
authorsoufiane <soufiane@cubedesigners.com>
Wed, 29 Oct 2025 15:59:31 +0000 (16:59 +0100)
committersoufiane <soufiane@cubedesigners.com>
Wed, 29 Oct 2025 15:59:31 +0000 (16:59 +0100)
app/Models/FluidbookAuditLink.php

index 2b63a36df77e4074e7aef34a25a049cc7d8c2368..7cc0310dc191eac6831b5d435a3a7b21ace410b4 100644 (file)
@@ -47,4 +47,18 @@ class FluidbookAuditLink extends ToolboxModel
         }
         return true;
     }
+
+    public static function getHttpCode($url) {
+        $ch = curl_init($url);
+
+        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
+        curl_setopt($ch, CURLOPT_NOBODY, true);
+        curl_setopt($ch, CURLOPT_TIMEOUT, 5);
+
+        curl_exec($ch);
+
+        $httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
+        curl_close($ch);
+        return $httpcode;
+    }
 }