[Linux-disciples] Grabbing the hostname with CGI

Adam Kessel linux-disciples@bostoncoop.net
Thu, 6 Nov 2003 00:20:02 -0800


--nHwqXXcoX0o6fKCv
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Um, remote_host() I believe is what you want.

On Thu, Nov 06, 2003 at 12:18:21AM -0500, Stephen R Laniel wrote:
> I'd like to include the hostname of an incoming weblog comment (see,
> e.g., http://laniels.org/weblog/my_life/niece.html) in the output. I want
> to do this
>=20
> a) so that posters are aware of the data that I already have on them, and
> b) so that I can save myself a little labor: I always end up digging
> through my Apache logs to find POSTs anyway, so why not put it right on
> the comments page itself?
>=20
> Now, blosxom already loads the standard CGI module. I assume there's some
> function within it that extracts the hostname or IP from an inbound
> request. If it's not in the CGI module, Apache must know about it.
> *Someone*, in any case, must know about it. What's the best way to grab
> it?
>=20
--=20
Adam Kessel
http://bostoncoop.net/adam

--nHwqXXcoX0o6fKCv
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQE/qgQxdTf3ZklQ6qYRAsOwAJ9s6eXgzV5tW5DmKgfvy5rqO1JblACgwIfL
jFUi6IXwpKMaTAjNiha9iPE=
=s+ja
-----END PGP SIGNATURE-----

--nHwqXXcoX0o6fKCv--