cvs: pear /Net_Whois Whois.php
| From: | Martin Jansen | Date: | Thu, 23 Aug 2001 20:31:29 +0000 |
| Subject: | cvs: pear /Net_Whois Whois.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-635@lists.php.net to get a copy of this message | ||
mj Thu Aug 23 16:31:29 2001 EDT
Modified files:
/pear/Net_Whois Whois.php
Log:
* style changes
# yes, you may call me pedantic
Index: pear/Net_Whois/Whois.php
diff -u pear/Net_Whois/Whois.php:1.1 pear/Net_Whois/Whois.php:1.2
--- pear/Net_Whois/Whois.php:1.1 Thu Aug 23 15:39:36 2001
+++ pear/Net_Whois/Whois.php Thu Aug 23 16:31:29 2001
@@ -1,5 +1,5 @@
<?php
-// $Id: Whois.php,v 1.1 2001/08/23 19:39:36 zimt Exp $
+//
// +----------------------------------------------------------------------+
// | PHP version 4.0 |
// +----------------------------------------------------------------------+
@@ -15,42 +15,43 @@
// +----------------------------------------------------------------------+
// | Authors: Sebastian Nohn <sebastian@nohn.net> |
// +----------------------------------------------------------------------+
+//
+// $Id: Whois.php,v 1.2 2001/08/23 20:31:29 mj Exp $
+//
require_once 'PEAR.php';
require_once 'Net/Socket.php';
/**
- * PEAR's Net_Whois:: interface. Provides functions
- * useful for Whois-Queries.
+ * 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 {
+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
- */
-
+ * 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) {
+ $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;
}
}