Closed

Server-Sent-Events / Ajax Back up PHP Chat solution - easily integratable with current mysql server if possible.

This project received 5 bids from talented freelancers with an average bid price of £2548 GBP.

Get free quotes for a project like this
Employer working
Skills Required
Project Budget
£20 - £250 GBP
Total Bids
5
Project Description

I need a chat which, based on whether the user is using ie or not, will provide a chat window within which the user needs to be able to:

Select a chat room - a button should be provided which lists chat rooms the user is within. Assume user data on chat rooms is listed within a database 'user_chats', with the columns user_id, status, room_id. if status is 1, the user may use the chat room, else the user may not.

The script should display new chat entries in a list which automatically scrolls down upon a new entry, except for when /stop is issued.

The script should provide an input box within which the user can type a message and press enter to send it to the server (Ideally using ajax request to create a new row in the database for that chat room - see below for table-chatroom seperation)

Stop scrolling - when the user types /stop, the chat should stop automatically scrolling. when they type /start, the chat should start scrolling automatically again. New entries should still be listed, but not cause an automatic scroll, during the period of /stop.

Create a chat room - by typing /create , the user should create a chat room. Note: The script should create a new mysql table for each chat room, plus a row in the database 'rooms', which should list the creator user_id, the chat name, the chat id (auto-assigned), and a password field which will initially be 0. A chat room should not be duplicatable (ie cannot be remade for a second table).

Join a chat room - the user should be able to join any chat room with a password of 0 by typing /join . If the chat room has a password, the user should be able to type something like /join chatroomname|password (something like php explode could be used to seperate the two).

Apply password - The user should be able to add a password to their chat room if they created it - /password should be able to be entered when the user is in the room. if they are not in a room they own, they should get an error 'You cannot set the password of a room you do not own'.

Pass on ownership - the user should be able to change the owner of the chat room to a specified ID like /passon . Again this would be if they owned the room they typed this input within.

Ban - depending on privaledges in the chat room, the user should be able to type /ban | to ban them for period in minutes.

General content:
All content which the user enters should be rigourously checked for html tags(via encoding), mysql injection, and php code.

The chat should use SSE for all users but IE. Server sent events allow for less server load and are ideal for a chat like application. For IE users, the script should instead provide an ajax installation, which polls the server for new chat messages once every 0.5 seconds.

I understand this is quite a task, but if your price is at an acceptable rate whereby its likely to save cash in terms of server load, I am ready to hire anyone with experience with SSE and PHP Ajax, so long as they are confident they can provide a working solution. I will be able to link up databases to the scripts you provide, but would want to not have to edit the scripts myself aside from defining constants like mysql user, password, database, etc. On that note, please have all chats with their seperate tables in the database 'Chats' and presume all the other tables are within the database 'Game'. It's expected you create a sandbox version of chat and test it out with similar tables etc. before sending the finalized version for me.

Please use: PHP version [url removed, login to view] and MySQL version 5.5.32-cll

Time basis: The project needs to be completed for 45 days.

Resources basis: I will provide a much more indepth content on the tables for the database if you take on this job, but I have detailingly gone through the needs above to be sure that when applying, you can do all that is asked for. I will be able to chat with you on the task if anything needs clearing up.

Looking to make some money?

  • Set your budget and the timeframe
  • Outline your proposal
  • Get paid for your work

Hire Freelancers who also bid on this project

    • Forbes
    • The New York Times
    • Time
    • Wall Street Journal
    • Times Online