Re: [PHP-PEAR] libwww for PHP

[email protected] (Mike) Tue, 13 Mar 2001 18:19:44 GMT
Newsgroups php.pear
Message-ID <1104_984507584@matthew>
Ok so I've started. But now pear gives me UAEs in PHP (latest version installed from newest PHP Triad (beta) (also occurs on older versions) under WinNT 4 service pack 6.

Here's the code:

<?php
require_once 'PEAR.php';
class Net_HTTP extends PEAR  {
    function connect($host,$port=80) {
        include_once('Socket.php');
        $this->socket = new Net_Socket();
	    if (PEAR::isError($this->socket)) {
            return new PEAR_Error('unable to create a socket object');
        }
	    if (PEAR::isError($this->socket->connect($this->host, $this->port))) {
            return new PEAR_Error('unable to open socket');
        }
        return true;
    }
}
$cla=new Net_HTTP;
$cla->connect("google.com");
?>

Suggestions for fixes?