// Create a new socket
$sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
// An example list of IP addresses owned by the computer
$sourceips['kevin'] = '127.0.0.1';
$sourceips['madcoder'] = '127.0.0.2';
// Bind the source address
socket_bind($sock, $sourceips['madcoder']);
// Connect to destination address
socket_connect($sock, $sourceips['madcoder'], 80);
// Write
$request = 'GET / HTTP/1.1' . "\r\n" .
'Host: example.com' . "\r\n\r\n";
socket_write($sock, $request);
// Close
socket_close($sock);
Ben bir hata alıyorum
Uyarı: socket_connect () [function.socket-connect]: bağlanamıyor [0]: Bir yuva işlemi erişilemeyen bir ana makine için denendi. C: \ wamp \ www \ sockert \ sockert.php hat 13
Teşekkürler,