File manager - Edit - /home/cipherteam/htdocs/cipherteam.in/API/IPO/V3/IPOCalendar/DataGetter/IPOCalandar.php
Back
<?php if(isset($_GET['year'])) $year = $_GET['year']; else exit(); if(isset($_GET['exchange'])) $exchange = $_GET['exchange']; else exit(); include 'simple_html_dom.php'; $html = file_get_html("https://www.chittorgarh.com/ipo/ipo_perf_tracker.asp?exchange=$exchange&year=$year"); $table = $html->find('table',2); $tbodys = $table->find('tbody'); if(count($tbodys) > 1) { $no = 1; foreach($tbodys as $tbody) { $tr = $tbody->find('tr', 0); $name = $tr->find('b', 0)->plaintext; $listOn = $tr->find('td', 1)->plaintext; if($listOn == "") continue; $issuePrice = $tr->find('td', 2)->plaintext; if(trim($issuePrice) == "") $issuePrice = "-"; $ListDayClose = $tr->find('td', 3)->plaintext; if(trim($ListDayClose) == "") $ListDayClose = "-"; $ListDayGain = $tr->find('td', 4)->plaintext; if(trim($ListDayGain) == "") $ListDayGain = "-"; $LTP = $tr->find('td', 5)->plaintext; if(trim($LTP) == "") $LTP = "-"; $currentReturn = $tr->find('td', 6)->plaintext; if(trim($currentReturn) == "") $currentReturn = "-"; ?> <div class="one-third top-border" style="width: 46%"> <div class="stat" style="color: #213369"><?php echo substr($name,0,20); ?></div> </div> <div class="one-third top-border left-border" style="width: 22%"> <?php if (strpos($ListDayGain,'-') !== false) { echo '<div class="stat" style="color: red">' . $ListDayGain . '</div>'; } else { echo '<div class="stat" style="color: green">+' . $ListDayGain . '</div>'; } ?> </div> <div class="one-third right-border top-border left-border" style="width: 22%"> <?php if (strpos($currentReturn,'-') !== false) { echo '<div class="stat" style="color: red">' . $currentReturn . '</div>'; } else { echo '<div class="stat" style="color: green">+' . $currentReturn . '</div>'; } ?> </div> <div class="one-third top-border" style="width: 10%" id='row<?php echo $no; ?>' onclick='showHideRow("<?php echo $no; ?>");'> <img src="images/down.svg" width="15px"> <img src="images/up.svg" width="15px" style="display:none"> </div> <div class="one-third hide" style="width: 100%" id='hidden_row<?php echo $no; ?>'> <div class="stat" style="color: grey; margin-bottom: 5px;">More Information</div> <div class="one-third top-border right-border left-border" style="width: 50%;"> <div class="stat" style="color: #213369">Current Price</div> </div> <div class="one-third top-border right-border" style="width: 50%"> <?php if ($LTP > $issuePrice ) { echo '<div class="stat" style="color: green">' . $LTP . '</div>'; } else if ($LTP < $issuePrice ) { echo '<div class="stat" style="color: red">' . $LTP . '</div>'; } else { echo '<div class="stat" style="color: grey">' . $LTP . '</div>'; } ?> </div> <div class="one-third top-border right-border left-border" style="width: 50%;"> <div class="stat" style="color: #213369">Issue Price</div> </div> <div class="one-third top-border right-border" style="width: 50%"> <div class="stat" style="color: #213369"> <?php echo $issuePrice; ?></div> </div> <div class="one-third top-border right-border left-border" style="width: 50%;"> <div class="stat" style="color: #213369">Listing Day Close</div> </div> <div class="one-third top-border right-border" style="width: 50%"> <?php if ($ListDayClose > $issuePrice ) { echo '<div class="stat" style="color: green">' . $ListDayClose . '</div>'; } else if ($ListDayClose < $issuePrice ) { echo '<div class="stat" style="color: red">' . $ListDayClose . '</div>'; } else { echo '<div class="stat" style="color: grey">' . $ListDayClose . '</div>'; } ?> </div> <div class="one-third top-border right-border bottom-border left-border" style="width: 50%;"> <div class="stat" style="color: #213369">Listed On</div> </div> <div class="one-third top-border right-border bottom-border" style="width: 50%"> <div class="stat" style="color: #213369"> <?php echo $listOn; ?></div> </div> </div> <?php $no = $no + 1; } } else { ?> <div class="one-third top-border" style="width:100%"> <div class="stat" style="color: #213369">No IPO Found</div> </div> <?php } ?>
| ver. 1.4 |
Github
|
.
| PHP 8.2.9 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings