I think it is not connected with instalation. Usually the PHP is compiled with pgsql support. It only has to be enabled in php.ini there is such line with
extension=php_pgsql.dll ; for windows
or
extension=pgsql.so ; for linux
So you have to uncomment it and restart apache. Then you can use pg_connect command in your php script to connect to whichever server in the internet where your db resides in.
Zdenek