One Hat Cyber Team
Your IP :
216.73.216.186
Server IP :
147.79.69.5
Server :
Linux in-mum-web1837.main-hosting.eu 5.14.0-503.34.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Mar 27 06:00:50 EDT 2025 x86_64
Server Software :
LiteSpeed
PHP Version :
8.2.28
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
u322583024
/
domains
/
awaha.in
/
public_html
/
Edit File:
token.php
<?php session_name('vaishnavi_awaha'); session_start(); error_reporting(E_ALL); ini_set('display_errors', 1); $servername = "localhost"; // Change if needed $username = "u322583024_awaha"; // Change to your DB username $password = "AwahaSoap@2025"; // Change to your DB password $dbname = "u322583024_awaha"; // Change to your database name $conn = new mysqli($servername, $username, $password, $dbname); // Check connection if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); } // Get order_id from URL if (!isset($_GET['order_id']) || empty($_GET['order_id'])) { die("Order ID is required."); } $order_id = $_GET['order_id']; // Call Shiprocket API to get token $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => "https://apiv2.shiprocket.in/v1/external/auth/login", 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 => json_encode([ "email" => "naturaljabon.sales@gmail.com", "password" => "Awaha@2025" ]), CURLOPT_HTTPHEADER => array( "Content-Type: application/json" ), )); $SR_login_Response = curl_exec($curl); curl_close($curl); $SR_login_Response_out = json_decode($SR_login_Response, true); // Check if token is received if (isset($SR_login_Response_out['token'])) { $token = $SR_login_Response_out['token']; // Update token in order table $sql = "UPDATE orders SET shiprocket_token = '$token' WHERE order_id = '$order_id'"; if ($conn->query($sql) === TRUE) { // Redirect to place_and_order.php with order_id header("Location: place-and-order.php?order_id=" . urlencode($order_id)); exit(); } else { echo "Error updating token: " . $conn->error; } } else { echo "Failed to get token. Response: " . json_encode($SR_login_Response_out); } $conn->close(); ?>
Simpan