Go4Expert

Go4Expert (http://www.go4expert.com/)
-   PHP (http://www.go4expert.com/forums/php/)
-   -   PHP and AJAX Push !!!! (http://www.go4expert.com/forums/php-ajax-push-t16265/)

Bhullarz 19Feb2009 09:07

PHP and AJAX Push !!!!
 
Hi ! I have one question that is it possible to implement AJAX PUSH with PHP ?
I want to deliever some content to my users who are currently online with request from the client side request.. Is it possible? If yes, do guide me..

thanks,
Bhullarz

Bhullarz 19Feb2009 11:25

Re: PHP and AJAX Push !!!!
 
Quote:

Originally Posted by Bhullarz (Post 43154)
Hi ! I have one question that is it possible to implement AJAX PUSH with PHP ?
I want to deliever some content to my users who are currently online with request from the client side request.. Is it possible? If yes, do guide me..

thanks,
Bhullarz

Let me make my question again... AS I am unable to edit my own post, I am posting it again.

Hi ! I have one question that is it possible to implement AJAX PUSH with PHP ?
I want to deliever some content to my users who are currently online without request from the client side request.. Is it possible? If yes, do guide me..

thanks,
Bhullarz

Bhullarz 26Feb2009 22:12

Re: PHP and AJAX Push !!!!
 
Even this question is not answered yet. So, let me answer it on my ow. Read Amazon Web Services. they are into such services for past 5 years. It is called Reverse Ajax / Comet / Ajax Push which can be implemented using PHP. Using this technique, we do not require action from client side to activate a script on the server. Server scripts can keep track of new data and can deliver to client without client's request.

mg7282 3Mar2011 06:40

Re: PHP and AJAX Push !!!!
 
Hi - I am trying to learn more on this topic. Any idea where I can find some useful info/tutorials?

ManzZup 3Mar2011 20:23

Re: PHP and AJAX Push !!!!
 
as i understand, the logic is something like the client has an opened connection to the server and picks up the resopnse from the server when available
and in reverse AJAX instead of the client checking for messages, the server send the message to client at once
and i think putting up a timeout or an interval will make a continous conenction
but hope anyother have a better idea :D

pein87 9Mar2011 03:48

Re: PHP and AJAX Push !!!!
 
I don't know of anyway to have the serve push data to the browser without using ajax. The server would have to request a browser reload if it were currently possible. Do your friends not have javascript turned on or something? You'd need some sort of file chaining or turn off the timeout because once a page loads the execution of that script stops and would not be able to "push" any thing. The whole purpose of ajax is so that you can make a request without reloading the page. Its not meant to work in reverse and have a script send data to the browser, let alone without a refresh. Server side is for the business logic and data manipulation while the client is for the display and they were not built with having the server being able to just send data that the client didn't request(this prevents servers from just sending viruses from scripts without a link being clicked or an infected page being loaded).


All times are GMT +5.5. The time now is 13:34.