actually am an fresher trying to create a website for cricket game based on real time entries.its basically in php and has a database. please help me if u have ever made such site.

Dani AI

Generated

Brief, practical roadmap that builds on ’s need for live score updates and on ’s warning that pushing real-time data from a classic request/response server can be awkward.

Start with three practical delivery patterns and pick by scale

  • Short polling: easiest to implement on the client. Poll every 2–5 seconds, include an ETag/last-update timestamp so the server can return 304 when nothing changed. Good for small sites or early prototypes.
  • Server-Sent Events (SSE): simple one-way push for score updates. Works well when clients only need to receive updates (no chat or bidirectional features). Fewer moving parts than WebSockets and automatic reconnects.
  • WebSockets: best for low-latency, two-way interactivity (chat, live betting, score confirmations). Run a dedicated event server (Node.js/socket.io or a WebSocket library) instead of forcing long-lived sockets into a synchronous web worker.

Data and scaling tips

  • Keep the live match state in a fast in-memory store for reads and quick broadcasts; persist snapshots to your relational database less frequently to avoid heavy write contention.
  • Use a pub/sub or message queue to broadcast changes from the write path to your event server(s). That decouples scoring updates from delivery.
  • Rate-limit updates from clients (validate and coalesce inputs on the server) so one bad client does not flood the system.

UX and reliability tips

  • Show a clear "last updated" timestamp and a small indicator when updates are delayed.
  • Highlight the most recent ball/change and animate sparingly so frequent updates don’t distract.
  • Provide graceful fallbacks: if push fails, fallback to polling.
  • Load-test with simulated concurrent users and monitor CPU, memory, and socket/file-descriptor usage before going live.

If time is short, a hosted realtime provider (Pusher/Ably) can remove infrastructure headaches.

Dose it have to use php? Streaming in php is a bitch. If it needs to be in php have a look over at soap if your going focusing on real time viewing.

sorrry i didnt get u.ya its in php and also involves database ofcourse.its related to cricket where i have to update score based on real game going on

Ok then thats easy. As long as no one has to view it in real time as well.

what database tech are you going to use? MySql?

ya its include mySQl.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.