Skip to content

Instantly share code, notes, and snippets.

@clue
Created January 26, 2014 17:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save clue/8636123 to your computer and use it in GitHub Desktop.
Save clue/8636123 to your computer and use it in GitHub Desktop.
<?php
$stream = stream_socket_client('tcp://www.example.com:80');
assert(is_resource($stream));
fclose($stream);
assert(!is_resource($stream));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment