File manager - Edit - /home/cipherteam/htdocs/cipherteam.in/APPS/CronJobs/IPONEWSFINDERS/MintIPONews.php
Back
<?php $con = mysqli_connect("localhost:3306", "marketdatauser", "d7o7A8%s2d7", "marketdataci"); $sql = "SELECT value AS 'VAL' FROM CronJobData WHERE datakey = 'IPOMINTNEWS';"; $rows = $con->query($sql); $data = $rows->fetch_assoc(); $oldnews = $data['VAL'] ?? ""; include_once("simple_html_dom.php"); $html = file_get_html("https://www.livemint.com/market/ipo/"); // ✅ IMPORTANT: mylistView is changed on LiveMint. Use safer selectors. // Collect headlines from h3 a (works on current page) $headlines = []; foreach ($html->find("h3 a") as $a) { $t = trim($a->plaintext ?? ""); $t = preg_replace('/\s+/', ' ', $t); $t = str_replace("'", "", $t); if ($t !== "") $headlines[] = $t; } $headlines = array_values(array_unique($headlines)); $allnews = ""; $ch = true; foreach ($headlines as $headline) { if ($ch) { $cleanHeadline = trim(str_replace("'", "", $headline)); if (strpos($oldnews, $cleanHeadline) !== false) { // old news // echo "true<br>"; } else { // ✅ Send via senNotification.php API (GET) $title = "New IPO News On LIVEMINT.COM 👇🏻"; file_get_contents("https://cipherteam.in/APPS/CronJobs/IPONEWSFINDERS/senNotification.php?key=PR@TIK@2552&title=".urlencode($title)."&message=".urlencode($cleanHeadline)); } $allnews .= $cleanHeadline; } $ch = !$ch; } // Update stored news $allnews = trim(str_replace("'", "", $allnews)); $allnews_sql = mysqli_real_escape_string($con, $allnews); $sql = "UPDATE CronJobData SET value = '".$allnews_sql."' WHERE datakey = 'IPOMINTNEWS'"; $con->query($sql); echo "DONE"; ?>
| ver. 1.4 |
Github
|
.
| PHP 8.2.9 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings