|
Server IP : 217.21.85.138 / Your IP : 216.73.216.103 Web Server : LiteSpeed System : Linux in-mum-web906.main-hosting.eu 4.18.0-553.37.1.lve.el8.x86_64 #1 SMP Mon Feb 10 22:45:17 UTC 2025 x86_64 User : u915722082 ( 915722082) PHP Version : 7.4.33 Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail MySQL : OFF | cURL : ON | WGET : ON | Perl : OFF | Python : OFF Directory (0755) : /home/u915722082/.nvm/../public_html/vpsjewellers/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<?php
date_default_timezone_set("Asia/Kolkata");
error_reporting(E_ALL);
ini_set('display_errors', '1');
function writeLog($message, $logFile = "application.log") {
$logFile = "application.log";
// Define the log file path
$filePath = __DIR__ . DIRECTORY_SEPARATOR . $logFile;
// Prepare the log entry with timestamp
$timeStamp = date("Y-m-d H:i:s");
$logEntry = "[{$timeStamp}] {$message}" . PHP_EOL;
// Write to the log file (append mode)
file_put_contents($filePath, $logEntry, FILE_APPEND | LOCK_EX);
}
class API{
public static function get($url){
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"Content-Type: application/json"
),
));
$response = curl_exec($curl);
curl_close($curl);
return $response;
}
}
$res = API::get("https://watermelonsugar.in/api/admin/jobs");
writeLog(date("Y-m-d H:i:s").": Payment ".$res);
$res = API::get("https://watermelonsugar.in/api/admin/cart/mail");
writeLog(date("Y-m-d H:i:s").": Mail ".$res);
$res = API::get("https://watermelonsugar.in/api/admin/order/offer/refund");
writeLog(date("Y-m-d H:i:s").": Refund ".$res);
?>