ı have a problem. bind is contiunues giving warning. warning is here :Warning: socket_bind(): unable to bind address [10048]: Only one usage of each socket address (protocol/network address/port) is normally permitted.
how can I solve with code this problem?. please help me
<?php
$host = "127.0.0.1";
$port = 801;
set_time_limit(0);
$socket = socket_create(AF_INET, SOCK_STREAM, 0) or die("Socket Oluşturulamadı
");
$result = socket_bind($socket, $host, $port) or die("Bağlanamadı
");
$result = socket_listen($socket, 3) or die("Dinlemede Hata
");
$spawn = socket_accept($socket) or die("***
");
$input = socket_read($spawn, 1024) or die("Giriş Okunamıyor
");
$input = trim($input);
echo "Client Mesajı : ".$input;
$output = strrev($input) . "
";
socket_write($spawn, $output, strlen ($output)) or die("Yazılamadı
");
// close sockets
socket_close($spawn);
socket_close($socket);
?>