OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
reader
/
creamapi
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
11/28/2024 11:03:35 AM
rwxrwxr-x
📄
api.php
1.35 KB
10/22/2024 07:13:21 AM
rw-r--r--
📄
db.php
355 bytes
10/22/2024 07:13:21 AM
rw-r--r--
📄
fetch_data.php
3.65 KB
10/23/2024 05:21:21 AM
rw-r--r--
📄
generate_token.php
1.34 KB
10/22/2024 07:13:22 AM
rw-r--r--
📄
proxy_fetch_data.php
932 bytes
10/22/2024 07:13:22 AM
rw-r--r--
📄
zfetch_data.php
1.89 KB
10/22/2024 07:13:22 AM
rw-r--r--
Editing: zfetch_data.php
Close
<?php ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); include '../inc/validate.logged.php'; include 'db.php'; $api_key = isset($_GET['api_key']) ? trim($_GET['api_key']) : null; $secret_key = isset($_GET['secret_key']) ? trim($_GET['secret_key']) : null; if (!$api_key || !$secret_key) { echo json_encode(['error' => 'API key and Secret key are required']); exit; } $query = "SELECT user_collection.title, user_collection.description, user_collection.url, user_collection.date_added FROM api_tokens INNER JOIN user_collection ON api_tokens.user_id = user_collection.user_id WHERE api_tokens.api_token = ? AND api_tokens.access_key = ?;"; $stmt = $mysqli->prepare($query); if ($stmt === false) { echo "<p>Failed to prepare SQL statement: " . $mysqli->error . "</p>"; exit; } $stmt->bind_param("ss", $api_key, $secret_key); if (!$stmt->execute()) { echo "<p>Query execution failed: " . $stmt->error . "</p>"; exit; } $result = $stmt->get_result(); if ($result->num_rows > 0) { echo "<div class='table-container'>"; echo "<table>"; echo "<tr>"; echo "<th>Title</th>"; echo "<th>Description</th>"; echo "<th>URL</th>"; echo "<th>Date Added</th>"; echo "</tr>"; while ($row = $result->fetch_assoc()) { echo "<tr>"; echo "<td>" . htmlspecialchars($row['title'] ?? '') . "</td>"; echo "<td>" . htmlspecialchars($row['description'] ?? '') . "</td>"; echo "<td><a href='" . htmlspecialchars($row['url'] ?? '#') . "' target='_blank'>" . htmlspecialchars($row['url'] ?? 'N/A') . "</a></td>"; echo "<td>" . htmlspecialchars($row['date_added'] ?? '') . "</td>"; echo "</tr>"; } echo "</table>"; echo "</div>"; } else { echo "<p>No matching records found.</p>"; } $stmt->close(); $mysqli->close(); ?>