RE: [PHP] Some questions regarding pfsocketopen()
| From: | Michael J. Pawlowsky | Date: | Thu, 02 Jan 2003 21:31:46 +0000 |
| Subject: | RE: [PHP] Some questions regarding pfsocketopen() | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-129994@lists.php.net to get a copy of this message | ||
Well I didnt try to write or read to it...
But this works.... But all that's telling me is that the var is there.. not if it's still
open.. will leave that to you to find out... Let us know....
--------------file s1.php ---------------------------
<?php
session_start();
$sid = session_id();
$mysocket = pfsockopen("localhost", "80");
session_register("mysocket");
echo "<a href=\"s2.php?PHPSESSID=$sid\">Next</a>";
?>
-------------------- file s2.php ---------------------------------
<?php
session_start();
echo (isset($_SESSION['mysocket']) ? "Socket found and open" : "Socket not
found");
?>
*********** REPLY SEPARATOR ***********
On 02/01/2003 at 4:08 PM Gareth Hastings wrote:
>The only code I've tried so far has been a simple
>
>makeconnection.php
>
><?
> $mysocket = pfsocketopen("my.server.com", "1234");
>?>
>
>---------------------------------------
>
>testconnection.php
><?
> echo (isset($mysocket) ? "Socket found and open" : "Socket not
>found");
>?>
>