Created
January 30, 2013 04:28
-
-
Save letitride/4670620 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$fp = stream_socket_client( "tcp://address:port", $error, $errorstr, 60 ); | |
if(!$fp){ printf( "%s (%d)", $errorstr, $error ); } | |
$i = 0; | |
while($i++ < 100){ | |
$message = sprintf( "%03d message\n", $i ); | |
fwrite( $fp, $message ); | |
print $message; | |
} | |
fclose( $fp ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
will not work with resume