chat

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?
im pretty sure you can do it in php but you can't embed, mix, or integrate c++ with php or html.
Bare sockets in php?

but you can't embed, mix, or integrate c++ with php or html.


What do you think a php extension is?


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.


I'd agree with this


could i use c++ for this and is it possible to do it with php?


How would c++ help you? Where would the c++ executable run?

What you really want is ajax

http://www.w3schools.com/php/php_ajax_intro.asp
Last edited on
im sorry it was late at night and I for some reason thought it was css
there's an open source ajax instant messaging system like the one used on facebook.

http://ajaxim.com/

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.

Last edited on
thanks
I think you need to read up about AJAX.

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.

Topic archived. No new replies allowed.