Re: php socket function

From: Date: Tue, 13 Feb 2001 09:23:54 +0000
Subject: Re: php socket function
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-39383@lists.php.net to get a copy of this message
in php you need to use the function fsockopen() instead of the socket() check up the php manual for the scoket cunctions at http://www.php.net/manual/en/ref.sockets.php you can also download a good example of a class that uses the socket functions to send and recieve email from http://myprojects.cjb.net/ Download the Kazzam Intranet Email System code from here which has the class and the example of how to use it for sending and recieving email regards Ankur Verma HCL Technologies A1CD, Sec -16 Noida, UP India ----- Original Message ----- From: Tissandié To: Mailing Php (E-mail) Sent: Tuesday, February 13, 2001 2:44 PM Subject: [PHP] php socket function Hi all, need some help about socket functions. I try tu use socket function. This is my script: if (($sock = socket(AF_INET, SOCK_STREAM, 0)) < 0) { echo "socket() a echoué - raison : " . strerror($sock) . "\n"; } And this is the error I always get : Fatal error: Call to undefined function: socket() in d:\myscript.php on line 175 I'm using PHP with WIN NT. The error is the same with PHP Version 4.0.5-dev , or PHP Version 4.0.4. I've installed PHP from binary code, not with re-compiling source. First question : is socket function installed on php version for windows ? Second : if yes, where is the problem..... Thank you for your help, François Tissandié. Embrassez ceux que vous aimez Atos-Infogérance Tour MANHATTAN 6 Place de l'Iris 92400 Courbevoie Cedex Tél. : 01.70.92.49.67 Fax. : 01.70.92.48.57 e-mail : francois.tissandie@atosorigin.com

« previous php.general (#39383) next »