Do you want to create a facebook like chat sytem in php then this small but effective proejct will help you