<?php

$url = "https://web.facebook.com/photo/?fbid=1389243376572189";

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

// Fake browser headers
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "User-Agent: Mozilla/5.0",
    "Accept-Language: en-US,en;q=0.9"
]);

$html = curl_exec($ch);
curl_close($ch);

// Try to extract number
preg_match('/All reactions:.*?<span[^>]*>(\d+)<\/span>/s', $html, $matches);

if (isset($matches[1])) {
    echo "Reactions: " . $matches[1];
} else {
    echo "Not found";
}

?>