[insert_php]
//require_once(‘/home/redleri1/public_html/staging/wp-content/themes/TheFox/PHPEncryption/OpenSSL.class.php’);
$dsn = ‘4D:host=76.72.95.153;charset=UTF-8;’; //prod
$user = ‘web_proc_pmt’;
$pass = ‘478500#Pg’;
try {
// Connection to the 4D SQL server
$db = new PDO($dsn, $user, $pass);
//$data = “1000750”; //<== This is the original account number
//$ws = new BillPayEncryptAPI\OpensslAES();
//$key = $ws::getKey();
//$ciphertext = $ws::encrypt($data, $key);
//$ciphertext_base64 = base64_encode($ciphertext);
//echo $ciphertext_base64;
//$qryStr = "UPDATE App_Config SET value='".$ciphertext_base64."' where iD=3";
//$qryStr = "UPDATE App_Config SET value='cdbcbb4adf0eed3da2d4b0f3ba914d7e4af019230cd47cfce0fc7bdb' where iD=4";
//$stmt = $db->prepare($qryStr);
//$stmt->execute();
//$stmt = $db->prepare(“SELECT * from App_Config”);
$stmt = $db->prepare(“SELECT * from Customers”);
$stmt->execute();
print_r($stmt->fetchAll());
echo “Connected successfully
“;
} catch (PDOException $e) {
echo ‘
There was an error connecting to the database!
‘;
die(“Erreur 4D : ” . $e->getMessage());
}
unset($stmt);
unset($db);
[/insert_php]