One Hat Cyber Team
Your IP :
3.145.146.15
Server IP :
50.28.103.30
Server :
Linux host.jcukjv-lwsites.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
Server Software :
nginx/1.24.0
PHP Version :
8.3.12
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
www
/
wwwroot
/
globify.live
/
fns
/
currency_tools
/
Edit File:
load.php
<?php function currency_converter($amount, $sourceCurrency, $setCurrency = null) { if (empty($setCurrency)) { $setCurrency = 'USD'; } $api_url = 'https://open.er-api.com/v6/latest/'.$setCurrency; $cache_file = 'fns/currency_tools/'.strtolower($setCurrency).'_rates_cache.json'; if (file_exists($cache_file) && (time() - filemtime($cache_file)) < 36000) { $data = json_decode(file_get_contents($cache_file), true); } else { $ch = curl_init($api_url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); $data = json_decode($response, true); if ($data && isset($data['rates'])) { file_put_contents($cache_file, json_encode($data)); } } $exchangeRates = array(); if (isset($data['rates'])) { $exchangeRates = $data['rates']; } if ($sourceCurrency == 'USD' && $setCurrency == 'USD') { $convertedAmount = $amount; } elseif (isset($exchangeRates[$sourceCurrency])) { $usdAmount = $amount / $exchangeRates[$sourceCurrency]; $convertedAmount = $usdAmount; } else { $convertedAmount = null; } return $convertedAmount; }
Simpan