File manager - Edit - /home/cipherteam/htdocs/cipherteam.in/backup2609/APPS/CronJobs/LinkInTime/AllotmentChecker.php
Back
<?php $n = 1; $curl_session = curl_init(); while ($n < 10) { curl_setopt_array($curl_session, array( CURLOPT_URL => 'https://linkintime.co.in/mipo/IPO.aspx/GetDetails', CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_HTTPHEADER => array( 'authority: linkintime.co.in', 'accept: application/json, text/javascript, */*; q=0.01', 'accept-language: en-US,en;q=0.9,gu;q=0.8,zh-TW;q=0.7,zh;q=0.6', 'content-length: 0', 'content-type: application/json;charset:utf-8', 'cookie: ASP.NET_SessionId=nsyi5d45fhcywpvma02mnc45', 'origin: https://linkintime.co.in', 'referer: https://linkintime.co.in/mipo/Ipoallotment.html', 'sec-ch-ua: "Google Chrome";v="113", "Chromium";v="113", "Not-A.Brand";v="24"', 'sec-ch-ua-mobile: ?1', 'sec-ch-ua-platform: "Android"', 'sec-fetch-dest: empty', 'sec-fetch-mode: cors', 'sec-fetch-site: same-origin', 'user-agent: Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Mobile Safari/537.36', 'x-requested-with: XMLHttpRequest' ), )); curl_setopt($curl_session, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($curl_session, CURLOPT_SSL_VERIFYPEER, 0); $response = curl_exec($curl_session); /*$data = json_decode($response,true); $xmldata = simplexml_load_string($data['d']); $jsondata = json_encode($xmldata); $Fdata = json_decode($jsondata,true); print_r($jsondata); //echo $Fdata['Table']['companyname']; */ $ipo1 = "signature"; $ipo2 = "global"; if (strpos(strtolower($response), strtolower($ipo1)) !== false) { $no = true; $ipo = $ipo1; } elseif (strpos(strtolower($response), strtolower($ipo2)) !== false) { $no = true; $ipo = $ipo2; } else { $no = false; } $opt = $ipo . ' Allotment Out'; if ($no) { echo $opt; $path_to_fcm = "https://fcm.googleapis.com/fcm/send"; $server_key = "AAAAzvFKC6k:APA91bGwplf3DZMMEsvtWCoeCXnBttNVgS2h3s5GuPDA6RkYvnFZuYNLy-zYt5TlVAm2fusnmh3ZFZbTxpLs1xMVIRfXmYd-yQe-CpjItU0Im6zUcjbq9bLFuj9-2y7LSkBfp2eS2Qoo"; $con=mysqli_connect("localhost:3306", "marketdatauser_ci", "d7o7A8%s2d7", "market_data_ci"); $sql = "SELECT `fcmid` as 'FCM' FROM `admin_fcm`"; $result = $con->query($sql); while($row = $result -> fetch_assoc()) { $title = $opt; $msg = "Link in time"; $headers = array( 'Authorization: key=' . $server_key, 'Content-Type: application/json' ); $fields = array( 'to' => $row['FCM'], 'notification'=> array( 'title'=> $title, 'body'=> $msg, 'click_action' => 'MAIN' )); $payload = json_encode($fields); curl_setopt($curl_session, CURLOPT_URL,$path_to_fcm); curl_setopt($curl_session, CURLOPT_POST, true); curl_setopt($curl_session, CURLOPT_HTTPHEADER, $headers); curl_setopt($curl_session, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl_session, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($curl_session, CURLOPT_POSTFIELDS, $payload); $res = curl_exec($curl_session); } } sleep(5); $n = $n + 1; } curl_close($curl_session); ?>
| ver. 1.4 |
Github
|
.
| PHP 8.2.9 | Generation time: 0.29 |
proxy
|
phpinfo
|
Settings