Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

💬 PHP WebSocket Chat App (Ratchet bilan)

Ushbu loyiha Ratchet PHP kutubxonasidan foydalangan holda real-time chat dasturini yaratadi. WebSocket asosida foydalanuvchilar o‘zaro xabar almashishlari mumkin. Frontend esa Vue.js orqali tuzilgan va foydalanuvchilar holatini hamda chatlarni dinamik boshqaradi.


📦 Texnologiyalar

  • PHP 8+
  • Ratchet (PHP uchun WebSocket server)
  • ReactPHP (asinxron I/O uchun)
  • Vue.js (frontend)
  • Bootstrap (styling uchun)

🚀 Xususiyatlar

  • Foydalanuvchilar nomi orqali WebSocket ulanish
  • Hammaga yoki ma’lum bir foydalanuvchiga xabar yuborish
  • Online foydalanuvchilar ro‘yxatini kuzatish
  • Xabarlar tarixini brauzerda ko‘rish
  • Real-time (socket) asosida ishlash

🔧 O‘rnatish

  1. Repodan klonlash:
git clone https://github.com/yourname/php-websocket-chat.git
cd php-websocket-chat

Composer bilan kerakli kutubxonalarni o‘rnatish:

composer install

Serverni ishga tushurish:

php server/server.php

⚠️ WebSocket server localhost:8081 portida ishlaydi.

Frontendni ishga tushurish:

Oddiy index.html faylni brauzerda oching:

open public/index.html # yoki double-click

📁 Loyihaning tuzilmasi

├── public/
│   ├── index.html       # Vue frontend
│   ├── main.js          # Vue ilova kodi
│   └── vue.js           # Vue framework
│
├── server/
│   ├── server.php       # WebSocket serverni ishga tushuradi
│
├── src/
│   ├── Chat.php         # MessageComponent interfeysi
│   └── Message.php      # JSON formatida xabarlar
│
├── composer.json
└── README.md

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages