OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
cream
/
admin
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
06/17/2025 10:17:24 AM
rwxrwxr-x
📁
assets
-
11/09/2024 12:33:14 PM
rwxrwxr-x
📄
brss_feed_articles.php
4.8 KB
05/19/2025 10:07:22 AM
rw-rw-r--
📄
brss_feed_store.php
3.77 KB
05/19/2025 10:07:22 AM
rw-rw-r--
📄
business_analytics.jpg
10.58 KB
03/25/2025 01:30:36 PM
rw-r--r--
📄
chanakya_logo.png
15.76 KB
03/24/2025 01:19:34 PM
rw-r--r--
📁
css
-
11/09/2024 12:33:13 PM
rwxrwxr-x
📄
fetch_articles.html
317 bytes
11/09/2024 12:33:02 PM
rw-rw-r--
📁
fonts
-
11/09/2024 12:33:03 PM
rwxrwxr-x
📁
images
-
11/09/2024 12:33:03 PM
rwxrwxr-x
📄
index.php
6.04 KB
05/19/2025 10:07:22 AM
rw-rw-r--
📁
js
-
11/09/2024 12:33:04 PM
rwxrwxr-x
📄
l2.html
14.08 KB
11/09/2024 12:33:02 PM
rw-rw-r--
📄
rss_feed_articles.php
3.86 KB
05/19/2025 10:07:22 AM
rw-r--r--
📄
rss_feed_store.php
3.76 KB
05/19/2025 10:07:22 AM
rw-r--r--
📁
scss
-
11/09/2024 12:33:13 PM
rwxrwxr-x
📄
test3.php
10.45 KB
05/19/2025 10:07:22 AM
rw-rw-r--
Editing: rss_feed_store.php
Close
<?php // Include the SimplePie library require_once('../assets/php/simplepie/autoloader.php'); require_once('../assets/php/db_config.php'); // Create a MySQLi connection // $mysqli = new mysqli($servername, $username, $password, $dbname); // Check connection // if ($mysqli->connect_error) { // die('Connection failed: ' . $mysqli->connect_error); // } // Check if the RSS URL is submitted if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['rss_url']) && !empty($_POST['rss_url'])) { $rss_url = $_POST['rss_url']; // Create a new SimplePie object // $feed = new SimplePie\SimplePie(); $feed = new SimplePie(); $feed->set_feed_url($rss_url); $feed->init(); // Check for errors if ($feed->error()) { echo 'Error: ' . $feed->error(); exit; } // Prepare SQL statement for inserting or updating data $stmt = $readerdb->prepare('REPLACE INTO rss_feeds_url (rss_url, rss_title, rss_description, rss_publisher, rss_image, rss_language) VALUES ( ?, ?, ?, ?, ?, ?)'); // Fetch feed details $rss_title = $feed->get_title(); $rss_description = $feed->get_description(); $rss_publisher = $feed->get_title(); // Assuming publisher is the feed title $rss_image = $feed->get_image_url(); $rss_language = $feed->get_language(); // Bind parameters and execute $stmt->bind_param('ssssss', $rss_url, $rss_title, $rss_description, $rss_publisher, $rss_image, $rss_language); $stmt->execute(); echo 'Feed metadata has been processed and stored in the database.'; } // Fetch all RSS feeds from the database $result = $readerdb->query('SELECT * FROM rss_feeds_url'); ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>RSS Feed Processor</title> </head> <body> <h1>RSS Feed Processor</h1> <!-- Form for entering RSS Feed URL --> <form action="" method="post"> <label for="rss_url">Enter RSS Feed URL:</label> <input type="text" id="rss_url" name="rss_url" required> <input type="submit" value="Process Feed"> </form> <!-- Display stored RSS feeds --> <h2>Stored RSS Feeds</h2> <?php if ($result->num_rows > 0): ?> <table border="1"> <thead> <tr> <th>RSS URL</th> <th>Title</th> <th>Description</th> <th>Publisher</th> <th>Image</th> <th>Category</th> <th>Language</th> </tr> </thead> <tbody> <?php while ($row = $result->fetch_assoc()): ?> <tr> <td><?php echo htmlspecialchars($row['rss_url']); ?></td> <td><?php echo htmlspecialchars($row['rss_title']); ?></td> <td><?php echo htmlspecialchars($row['rss_description']); ?></td> <td><?php echo htmlspecialchars($row['rss_publisher']); ?></td> <td><?php if (!empty($row['rss_image'])): ?><img src="<?php echo htmlspecialchars($row['rss_image']); ?>" alt="Feed Image" style="max-width:100px;"><?php endif; ?></td> <td><?php echo htmlspecialchars($row['rss_category']); ?></td> <td><?php echo htmlspecialchars($row['rss_language']); ?></td> </tr> <?php endwhile; ?> </tbody> </table> <?php else: ?> <p>No RSS feeds found in the database.</p> <?php endif; ?> <?php // Free the result set $result->free(); // Close the MySQLi connection $readerdb->close(); ?> </body> </html>