I have this webpage, and there are some extensions which aren't exactly compatible with it (Grammarly for instance). I want to check if it is installed, and show a popup. I was using this locally and it works flawlessly:
$count = 0;
$page = "manifest";
for ($i = 0; $i<count($id); $i++){
$path = '/.config/google-chrome/Default/Extensions/'.$id[$i].'/*/';
$file = glob($path.$page.'.json');
while ((strpos($file[0], $page) == false) and ($count != 10)) {
$path = '/*' . $path;
$file = glob($path.$page.'.json');
$count++;
}
$json_a = json_decode(file_get_contents($file[0]), true);
$name[$i] = $json_a["name"];
(below this I show the result in a popup etcetera, not relevant)
Thing is, this won't work from a server, because that file is local. Is there a way to use this on a server or any other way to check if a certain extension is installed using only PHP?