+ /**
+ * @brief Get the basepath for a given contact link
+ *
+ * @param string $url The contact link
+ *
+ * @return string basepath
+ */
+ public static function getBasepath($url)
+ {
+ $data = Probe::uri($url);
+ if (!empty($data['baseurl'])) {
+ return $data['baseurl'];
+ }
+
+ $urlarr = explode('/profile/', $url);
+ $basepath = $urlarr[0];
+
+ return $basepath;
+ }
+