📁 Folder Navigator
Position:
Root
/
apphome
/
network
Create
Folders
📁 audience
Rename
Copy
Delete
📁 chats
Rename
Copy
Delete
📁 clients
Rename
Copy
Delete
📁 complaintants
Rename
Copy
Delete
📁 fans
Rename
Copy
Delete
Files
📄 .htaccess
📄 .user.ini
📄 chat_history.txt
📄 clean_xml.php
📄 error_log
📄 index.php
📄 index2.php
📄 mychats.php
📄 users.xml
📝 File Editor
Editing:
clean_xml.php
<?php $xmlFile = '../../admin/access/vidkeys/masterusers.xml'; if (file_exists($xmlFile)) { $xml = simplexml_load_file($xmlFile); $currentTime = time(); $expiredCount = 0; foreach ($xml->xpath('//user') as $user) { if (isset($user->expires)) { $expiryTime = (int)$user->expires; if ($currentTime >= $expiryTime) { $dom = dom_import_simplexml($user); $dom->parentNode->removeChild($dom); $expiredCount++; } } }xlm.php 1 message a Barber <antwinabarber@gmail.com> Sun, Jun 28, 2026 at 7:41 PM To: a Barber <antwinabarber@gmail.com> <?php $xmlFile = '../../admin/access/vidkeys/masterusers.xml'; if (file_exists($xmlFile)) { $xml = simplexml_load_file($xmlFile); $currentTime = time(); $expiredCount = 0; foreach ($xml->xpath('//user') as $user) { if (isset($user->expires)) { $expiryTime = (int)$user->expires; if ($currentTime >= $expiryTime) { // === START OF ASSET PURGE LOGIC === // 1. Grab the unique virtual_id from the current expired user node $expiredVid = (string)$user->virtual_id; $uploadDir = "uploads/"; // 2. Scan the uploads folder and wipe matching files if (is_dir($uploadDir)) { $files = scandir($uploadDir); $targetPrefix = $expiredVid . "_"; foreach ($files as $file) { // Skip system dots and ensure filename starts exactly with the target VID prefix if ($file !== '.' && $file !== '..' && strpos($file, $targetPrefix) === 0) { $fullPath = $uploadDir . $file; if (is_file($fullPath)) { unlink($fullPath); // Permanently deletes the file from the server } } } } // === END OF ASSET PURGE LOGIC === // Proceed with your original code to detach the user from the XML $dom = dom_import_simplexml($user); $dom->parentNode->removeChild($dom); $expiredCount++; } } } // Save the newly formatted, cleaned XML back to disk if ($expiredCount > 0) { $dom = new DOMDocument('1.0'); $dom->preserveWhiteSpace = false; $dom->formatOutput = true; $dom->loadXML($xml->asXML()); $dom->save($xmlFile); } } ?> if ($expiredCount > 0) { $dom = new DOMDocument('1.0'); $dom->preserveWhiteSpace = false; $dom->formatOutput = true; $dom->loadXML($xml->asXML()); $dom->save($xmlFile); } } ?>
💾 Save Changes