<?php
// URL of the file
$url = "https://stephieluv.com/manager/scraped/stephiesbx/data.txt";

// Fetch the content of the file
$data = file_get_contents($url);
if ($data === false) {
    die("Error: Unable to fetch the file.\n");
}

// Extract all "id" values using regex
preg_match_all('/"id":\s*"([^"]+)"/', $data, $matches);

// Check if any IDs were found
if (empty($matches[1])) {
    die("No IDs found in the file.\n");
}

// Count occurrences of each ID
$idCounts = array_count_values($matches[1]);

// Filter only duplicates
$duplicates = array_filter($idCounts, function($count) {
    return $count > 1;
});

// Display results
if (!empty($duplicates)) {
    echo "Duplicate IDs found:\n\n";
    foreach ($duplicates as $id => $count) {
        echo "ID: $id - Occurrences: $count\n";
    }
} else {
    echo "No duplicate IDs found.\n";
}
?>
