- stream_context_create: documentation ( source)
- print_r: documentation ( source)
- stream_socket_client: documentation ( source)
<?php
$socket_context = stream_context_create($options = array());
$socket = stream_socket_client
(
'example.com' . ":" . 80,
$errno,
$errstr,
$timeout,
STREAM_CLIENT_CONNECT,
$socket_context
);
print_r($errstr);
?>