HEX
Server: LiteSpeed
System: Linux s12873.lon1.stableserver.net 5.14.0-611.11.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Dec 3 09:47:37 EST 2025 x86_64
User: jairicem (1242)
PHP: 8.2.31
Disabled: NONE
Upload Files
File: /home/jairicem/alfijiri.com/app/helpers/shop_helper.php
<?php

defined('BASEPATH') or exit('No direct script access allowed');

if (!function_exists('convert_currency')) {
    function convert_currency($amount, $from, $to)
    {
        $data = file_get_contents("https://www.google.com/finance/converter?a=$amount&from=$from&to=$to");
        preg_match("/<span class=bld>(.*)<\/span>/", $data, $converted);
        $converted = preg_replace('/[^0-9.]/', '', $converted[1]);
        return number_format(round($converted, 3), 2);
    }
}