Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php $dbname = getenv('POSTGRES_DB'); $user = getenv('POSTGRES_USER'); $password =..

Decoded Output download

<?php

$dbname   = getenv('POSTGRES_DB');
$user     = getenv('POSTGRES_USER');
$password = getenv('POSTGRES_PASSWORD');
$strConn  = "pgsql:host=database;dbname=$dbname;user=$user;password=$password";

try {
    $conn = new PDO($strConn);
    echo "<p>Database Connection Sucessful!!!</p>";
} catch (PDOException $error) {
    echo "Error:" . $error->getMessage();
    die();
}

echo "<p>See <a href='http://{$_SERVER[HTTP_HOST]}/info.php'> Here</a> for PHP info.</p>";
 ?>

Did this file decode correctly?

Original Code

<?php

$dbname   = getenv('POSTGRES_DB');
$user     = getenv('POSTGRES_USER');
$password = getenv('POSTGRES_PASSWORD');
$strConn  = "pgsql:host=database;dbname=$dbname;user=$user;password=$password";

try {
    $conn = new PDO($strConn);
    echo "<p>Database Connection Sucessful!!!</p>";
} catch (PDOException $error) {
    echo "Error:" . $error->getMessage();
    die();
}

echo "<p>See <a href='http://{$_SERVER[HTTP_HOST]}/info.php'> Here</a> for PHP info.</p>";

Function Calls

getenv 1

Variables

None

Stats

MD5 7de3b2737e241d915ea016e045cec3b1
Eval Count 0
Decode Time 85 ms