I get this message. i changed ip adress and port to keep it hidden =)
Warning: socket_connect() [function.socket-connect]: unable to connect [115]: Operation now in progress in /mounted-storage/home60b/sub001/sc18478-RGIJ/thenarutommorpg.com/test.php on line 4
[+] Connected
with this code
how can I stop the warning from coming up?
Code: Select all
<?php
$sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
socket_set_nonblock($sock);
socket_connect($sock,"someIP", somePORT);
socket_set_block($sock);
switch(socket_select($r = array($sock), $w = array($sock), $f = array($sock), 252))
{
case 2:
echo "[-] Connection Refused\n";
break;
case 1:
echo "[+] Connected\n";
break;
case 0:
echo "[-] Timeout\n";
break;
}
?>