OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
cream
/
api
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
06/17/2025 10:17:24 AM
rwxrwxr-x
📄
articles.php
2.74 KB
05/19/2025 10:07:13 AM
rwxrwxrwx
📄
stream.php
1.33 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
test.json
5.78 KB
04/09/2025 12:49:46 PM
rw-r--r--
Editing: stream.php
Close
<? require_once '../assets/php/db_config.php'; $sql = " SELECT rs.*, u.full_name FROM reader.reader_stream rs INNER JOIN user u ON rs.userId = u.id WHERE rs.deleteFlag = 0 AND rs.referenceId IS NULL AND rs.visibility='public' ORDER BY rs.postedOn DESC LIMIT 50"; $result = $creamdb->query($sql); // Initialize the data container $streamDatas = []; // Check if there are any results if ($result->num_rows > 0) { while ($row = $result->fetch_assoc()) { // Create an array of the stream data including full_name, chat, imgurl, postedOn $streamData = []; $streamData['id'] = $row['id']; $streamData['full_name'] = $row['full_name']; $streamData['chat'] = $row['chat']; if($row['mediaPath']==""){ $streamData['imgurl'] = $row['mediaPath']; }else{ $streamData['imgurl'] = 'https://knoblycream.com/'.$row['mediaPath']; } $streamData['postUrl'] = 'https://knoblycream.com/post-details.php?id='.$row['id']; $streamData['postedOn'] = $row['postedOn']; $streamDatas[] = $streamData; } } header('Content-Type: application/json'); // Return the data as a JSON response echo json_encode($streamDatas); // Close the database connection $readerdb->close(); exit;