Re: fsockopen with unusual port
| From: | Larry Rosenman | Date: | Wed, 08 May 2002 02:28:14 +0000 |
| Subject: | Re: fsockopen with unusual port | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-96516@lists.php.net to get a copy of this message | ||
On Tue, 2002-05-07 at 21:25, Analysis & Solutions wrote:
> Hi:
>
> I'm trying to use fsockopen() with an unusual port number. It comes
> back as Error Number 61, "Connection refused." If I change the port to
> something normal, like 80 or 23, it works fine. What's up?
>
sounds like nothing is listening on that port.
> Here's my code:
>
> $Sock = fsockopen('localhost', 7777, $ErrNo, $ErrStr, 5);
I think this needs to be:
$Sock = fsockopen('localhost', 7777, $&ErrNo, $&ErrStr, 5);
>
> if ($Sock) {
> while ( !feof($Sock) ) {
> }
> fclose($Sock);
>
> } else {
> echo "Listener couldn't open socket. Err #$ErrNo: $ErrStr.\n";
> exit();
>
> }
>
>
> Thanks,
>
> --Dan
>
> --
> PHP classes that make web design easier
> SQL Solution | Layout Solution | Form Solution
> sqlsolution.info | layoutsolution.info | formsolution.info
> T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
> 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 972-414-9812 E-Mail: ler@lerctr.org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749