OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
3-31-025chanakya
/
education-podcasts
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
03/31/2025 06:36:42 AM
rwxr-xr-x
📄
database.sql
592 bytes
03/31/2025 06:36:42 AM
rw-r--r--
📄
fetchRSS.php
950 bytes
03/31/2025 06:36:42 AM
rw-r--r--
📁
includes
-
03/31/2025 06:36:42 AM
rwxr-xr-x
📄
index.php
1.09 KB
03/31/2025 06:36:42 AM
rw-r--r--
📄
podcast.php
2.05 KB
03/31/2025 06:36:42 AM
rw-r--r--
📄
style.css
0 bytes
03/31/2025 06:36:42 AM
rw-r--r--
📄
upload.php
683 bytes
03/31/2025 06:36:42 AM
rw-r--r--
📁
uploads
-
03/31/2025 06:36:42 AM
rwxr-xr-x
Editing: fetchRSS.php
Close
<?php include "includes/db.php"; function fetchRSS($feed_id, $url, $conn) { $rss = simplexml_load_file($url); foreach ($rss->channel->item as $item) { $title = (string)$item->title; $link = (string)$item->link; $description = (string)$item->description; $audio = isset($item->enclosure['url']) ? (string)$item->enclosure['url'] : null; // Insert into DB if not already present $stmt = $conn->prepare("INSERT IGNORE INTO episodes (feed_id, title, link, description, audio_url) VALUES (?, ?, ?, ?, ?)"); $stmt->bind_param("issss", $feed_id, $title, $link, $description, $audio); $stmt->execute(); } } // Get all feeds and fetch episodes $sql = "SELECT id, url FROM rss_feeds"; $result = $conn->query($sql); while ($row = $result->fetch_assoc()) { fetchRSS($row['id'], $row['url'], $conn); } echo "Episodes updated successfully!"; ?>