- An application that performs data communication between server and client.
- More than one client can communicate with the server.
- While a client and server are communicating, other clients can communicate with the server.
- These communications appear in the application console.
- TCP protocol is used.
To make it run;
- You must have Xampp installed on your computer (C:\xampp) -> https://www.apachefriends.org/en/download.html
- In C:\xampp\htdocs\ add the files in this repo -> https://github.com/serkankisacik/PHP-SocketProgramming/archive/refs/heads/main.zip
- Assuming you added it as C:\xampp\htdocs\socket.
- Open run with Win+R key combination and run cmd.
- Run php -f C:\xampp\htdocs\socket\server.php. Now your server can accept the request.
- Run Xampp Apache service.
- Go to http://localhost/socket/client.php in the browser.
- Now the server and client can communicate.
https://www.youtube.com/watch?v=75CCxIBs4Ak has been used as a source. Thank you Alma Mae Bernales.
- Sunucu ve istemci arasında veri iletişimi gerçekleştiren bir uygulama.
- Sunucu ile birden fazla istemci haberleşebilir.
- Bir istemci ile sunucu iletişimde iken başka istemciler sunucu ile iletişime geçebilir.
- Bu iletişimler uygulama konsolunda görünür.
- TCP protokolü kullanılmıştır.
Çalıştırmak için;
- Bilgisayarınızda Xampp Kurulu olması gerekir (C:\xampp) -> https://www.apachefriends.org/tr/download.html
- C:\xampp\htdocs\ içerisine bu repo içerisindeki dosyaları ekleyin -> https://github.com/serkankisacik/PHP-SocketProgramming/archive/refs/heads/main.zip
- Varsayalım ki dosyaları C:\xampp\htdocs\socket klasörüne eklediniz.
- Win+R Tuş kombinasyonu ile çalıştırı açın ve cmd'yi çalıştırın.
- php -f C:\xampp\htdocs\socket\server.php komutunu çalıştırın. Artık sunucunuz istekleri kabul edebilir durumda olacak.
- Xampp Apache servisini çalıştırın.
- Tarayıcınızda http://localhost/socket/client.php adresine gidin.
- Artık sunucu ve istemci iletişim kurabilir.
https://www.youtube.com/watch?v=75CCxIBs4Ak kaynak olarak kullanılmıştır. Alma Mae Bernales'e teşekkür ederiz.