File manager - Edit - /home/cipherteam/htdocs/cipherteam.in/backup2609/API/Finance/GetCMP.php
Back
<?php if(isset($_GET['id'])) { $id = explode("_",$_GET['id']); $id = $id[1]; $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => 'https://ewmw.edelweiss.in/ewreports/api/search/gsa/suggestions', 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_POSTFIELDS =>'{"SearchString":"' . $id . '","Cookie":""}', CURLOPT_HTTPHEADER => array( 'authority: ewmw.edelweiss.in', 'accept: application/json, text/plain, */*', 'accept-language: en-US,en;q=0.9,gu;q=0.8,zh-TW;q=0.7,zh;q=0.6', 'content-type: application/json;charset=UTF-8', 'origin: https://www.edelweiss.in', 'referer: https://www.edelweiss.in/', 'sec-ch-ua: "Google Chrome";v="107", "Chromium";v="107", "Not=A?Brand";v="24"', 'sec-ch-ua-mobile: ?0', 'sec-ch-ua-platform: "Windows"', 'sec-fetch-dest: empty', 'sec-fetch-mode: cors', 'sec-fetch-site: same-site', 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36' ), )); $response = curl_exec($curl); curl_close($curl); $data = json_decode($response,true); $sr = $data['sr']; $cprice = $sr[0]['pr']; $chng = $sr[0]['cn']; $pchng = $sr[0]['pn']; if($chng > 0) $chng = '+' . $chng; if($pchng > 0) $pchng = '+' . $pchng; echo "Current Price : ₹ $cprice [$chng($pchng%)]" ; } ?>
| ver. 1.4 |
Github
|
.
| PHP 8.2.9 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings