Skip to content

Instantly share code, notes, and snippets.

@letitride
Created January 30, 2013 04:28
Show Gist options
  • Save letitride/4670620 to your computer and use it in GitHub Desktop.
Save letitride/4670620 to your computer and use it in GitHub Desktop.
<?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 );
@Sarfroz
Copy link

Sarfroz commented Aug 12, 2017

will not work with resume

@Mykola-Veryha
Copy link

Error opening socket ssl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment