File manager - Edit - /home/cipherteam/htdocs/cipherteam.in/API/IPO/V3/GetMarketNews.php
Back
<?php if(isset($_GET["Skip"])) { $skip = $_GET["Skip"]; require_once("Connection.php"); $sql = "SELECT `id` AS 'ID',`text` AS 'TEXT',`img` AS 'IMG',`date` AS 'DATE',`link` AS 'LINK',`card_type` AS 'CARD' FROM `market_news` ORDER BY `id` DESC"; $rows = $con->query($sql); if($rows->num_rows > 0) { while($skip > 0){ $rows->fetch_assoc(); $skip -= 1; } $count = 0; $News["News"] = array(); while($row = $rows->fetch_assoc()) { if($count == 10) break; $NewsSingle = array(); $NewsSingle = $row; array_push($News["News"],$NewsSingle); $count += 1; } $News["success"] = 1; } else { $News["success"] = 0; } echo json_encode($News); } mysqli_close($con); ?>
| ver. 1.4 |
Github
|
.
| PHP 8.2.9 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings