note 9575 deleted from ref.sockets by jimw

From: Date: Fri, 21 Dec 2001 00:32:51 +0000
Subject: note 9575 deleted from ref.sockets by jimw
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-23632@lists.php.net to get a copy of this message
[Editor's note: Not completely correct. Look at the (still not documented) functions (from the PHP source code): int gethostbyaddr(string addr, string &name) Given a human-readable address, sets name to be the host's name int gethostbyname(string name, string &addr) Given a hostname, sets addr to be a human-readable version of the host's address int getpeername(int fd, string &addr[, int &port]) Given an fd, stores a string representing sa.sin_addr and the value of sa.sin_port into addr and port describing the remote side of a socket int getsockname(int fd, string &addr[, int &port]) Given an fd, stores a string representing sa.sin_addr and the value of sa.sin_port into addr and port describing the local side of a socket These and other functions will be documented here eventually] I filed a wishlist bug because I do not see any way to get the IP address of the client. Until this is added I would use caution in implementing servers with PHP4. You can control access to selected ports at the OS level with linux. It might be wise to limit port access to specific machines or subnets.

« previous php.notes (#23632) next »