Justtechjobs.com Find a programming school near you






Online Campus Both


php3-list | 199903

[PHP3] little question about socket use From: Gael Duval (gael <email protected>)
Date: 03/31/99

Hi,

sorry if this question has been asked 1 million times before, but I've
looked into the php documentation and did not find any answer.

Here is the problem:

I'm trying this little example (given in the php manual):

<?

$fp = fsockopen("www.php.net", 80, &$errno, &$errstr);
if(!$fp) {
        echo "$errstr ($errno)<br>\n";
} else {
        fputs($fp,"GET / HTTP/1.0\n\n");
        while(!feof($fp)) {
                echo fgets($fp,128);
        }
        fclose($fp);
}

?>

result:

-----
Warning: Wrong parameter count for fsockopen() in
/home/gael/public_html/grab.phtml on line 6 ()
-----
...and no result... :-/

Where is the problem? :-/

--
< Gael DUVAL - gael <email protected> - http://linuxmandrake.com > 
QPL : "With the release of this license, KDE and the Qt Free Edition
are truly Open Source(tm)". Bruce Perens, Opensource.org.

-- PHP 3 Mailing List http://www.php.net/ To unsubscribe send an empty message to php3-unsubscribe <email protected> To subscribe to the digest list: php3-digest-subscribe <email protected> For help: php3-help <email protected> Archive: http://www.php.net/mailsearch.php3 List administrator: zeev-list-admin <email protected>