Hello, I am still trying to get socket functions to work, but have not had great success. Can anyone help with why my code below won't initialize a socket connection?
Thanks in advance:
<?php
function init_socket() {
if ($socket) {
echo "true";
return true;
}
# create a socket
$socket = fsockopen(reseller.enom.com, 80,
$errno, $errstr, 20 );
if (!$socket) {
echo "false";
return false;
} else {
echo "true";
return true;
}
}
init_socket();
?>