$server='157.159.110.17';
$database='NomDeLaBD';
$user='SonLogin';
$pass='SonPassword';
$chaine_cx="host=$server dbname=$database user=$user password=$pass";
$dbconn=pg_connect($chaine_cx) or die ('Could not connect'.$chaine_cx.pg_last_error());
echo "<p>connexion etablie</p>";