php man page for pg_host

Query: pg_host

OS: php

Section: 3

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

PG_HOST(3)																PG_HOST(3)

pg_host - Returns the host name associated with the connection

SYNOPSIS
string pg_host ([resource $connection])
DESCRIPTION
pg_host(3) returns the host name of the given PostgreSQL $connection resource is connected to.
PARAMETERS
o $connection - PostgreSQL database connection resource. When $connection is not present, the default connection is used. The default connection is the last connection made by pg_connect(3) or pg_pconnect(3).
RETURN VALUES
A string containing the name of the host the $connection is to, or FALSE on error.
EXAMPLES
Example #1 pg_host(3) example <?php $pgsql_conn = pg_connect("dbname=mark host=localhost"); if ($pgsql_conn) { print "Successfully connected to: " . pg_host($pgsql_conn) . "<br/> "; } else { print pg_last_error($pgsql_conn); exit; } ?>
SEE ALSO
pg_connect(3), pg_pconnect(3). PHP Documentation Group PG_HOST(3)
Related Man Pages
pg_pconnect(3) - php
pg_client_encoding(3) - php
pg_close(3) - php
pg_trace(3) - php
pg_tty(3) - php
Similar Topics in the Unix Linux Community
Killing host connection
check Internet connection?
connection from where?
How to find Hung connection in UNix Systems ?
Print out my current http connection