im working on a website and im making a active chat. its mainly ran in php but i don't think php can do a chat session without refreshing the screen. could i use c++ for this and is it possible to do it with php?
It hasn't been updated since Sept. 2010 though, but it's probably easier to try and integrate that into your website, instead of making one from scratch.
PHP and C++ run on the server so you can't create a chat program that doesn't require a new web page using only them.
What you need is to code part of the application in javascript using a technique called AJAX to communicate with the application running on the server (either PHP or C++).
The javascript can update the contents of the web-page without having to 'refresh' the whole page and it can send 'messages' (via AJAX) to the server-side application (either PHP or C++) and receive updated information.