cvs: pear /Net_Whois Whois.php package.xml

From: Date: Thu, 23 Aug 2001 19:39:36 +0000
Subject: cvs: pear /Net_Whois Whois.php package.xml
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-631@lists.php.net to get a copy of this message
zimt Thu Aug 23 15:39:36 2001 EDT Added files: /pear/Net_Whois Whois.php package.xml Log: Initial Commit, This package is for querying Whois Servers, done by Sebastian Nohn, sebastian@nohn.net i do this commit for him because he has no cvs account right now, think he'll apply for one in the next days Peter Index: pear/Net_Whois/Whois.php +++ pear/Net_Whois/Whois.php <?php // $Id: Whois.php,v 1.1 2001/08/23 19:39:36 zimt Exp $ // +----------------------------------------------------------------------+ // | PHP version 4.0 | // +----------------------------------------------------------------------+ // | Copyright (c) 1997-2001 The PHP Group | // +----------------------------------------------------------------------+ // | This source file is subject to version 2.02 of the PHP license, | // | that is bundled with this package in the file LICENSE, and is | // | available at through the world-wide-web at | // | http://www.php.net/license/2_02.txt. | // | If you did not receive a copy of the PHP license and are unable to | // | obtain it through the world-wide-web, please send a note to | // | license@php.net so we can mail you a copy immediately. | // +----------------------------------------------------------------------+ // | Authors: Sebastian Nohn <sebastian@nohn.net> | // +----------------------------------------------------------------------+ require_once 'PEAR.php'; require_once 'Net/Socket.php'; /** * PEAR's Net_Whois:: interface. Provides functions * useful for Whois-Queries. * @version 0.1 * @author Sebastian Nohn <sebastian@nohn.net> */ class Net_Whois extends PEAR { /** * Implements Net_Whois::query() function using PEAR's socket * functions * * @param string The whois-server to query * * @param string The whois database object to lookup * * @return string The data returned from the whois-server */ function query($server, $query) { $socket = new Net_Socket; $fp = $socket->connect($server, 43); if (!$fp) { $data = "Error connecting to $server"; } else { $query .= "\n"; $socket->write($query); $data = $socket->read(16384); $socket->disconnect(); } return $data; } } ?> Index: pear/Net_Whois/package.xml +++ pear/Net_Whois/package.xml <?xml version="1.0" encoding="ISO-8859-1" ?> <!-- do not use the "Type" attribute here, that one is only for generated package.xml files --> <Package> <Name>Net_Whois</Name> <Summary>The PEAR::Net_Whois class provides a tool for querying Whois Servers</Summary> <Maintainer> <Initials>SN</Initials> <Name>Sebastian Nohn</Name> <Email>sebastian@nohn.net</Email> </Maintainer> <Release> <Version>0.1</Version> <Date>2001-08-22</Date> <Notes> This is the initial independent release of the Net_Whois package. </Notes> </Release> <FileList> <Dir Name="/" BaseInstallDir="Net_Whois"> <File Role="php">Whois.php</File> </Dir> </FileList> </Package>

« previous php.pear.cvs (#631) next »