PHP and AJAX Push !!!!

Discussion in 'PHP' started by Bhullarz, Feb 19, 2009.

  1. Bhullarz

    Bhullarz New Member

    Joined:
    Nov 15, 2006
    Messages:
    253
    Likes Received:
    13
    Trophy Points:
    0
    Occupation:
    System Manager
    Home Page:
    http://www.tutors161.com
    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
     
  2. Bhullarz

    Bhullarz New Member

    Joined:
    Nov 15, 2006
    Messages:
    253
    Likes Received:
    13
    Trophy Points:
    0
    Occupation:
    System Manager
    Home Page:
    http://www.tutors161.com
    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
     
  3. Bhullarz

    Bhullarz New Member

    Joined:
    Nov 15, 2006
    Messages:
    253
    Likes Received:
    13
    Trophy Points:
    0
    Occupation:
    System Manager
    Home Page:
    http://www.tutors161.com
    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.
     
  4. mg7282

    mg7282 New Member

    Joined:
    Mar 3, 2011
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hi - I am trying to learn more on this topic. Any idea where I can find some useful info/tutorials?
     
  5. ManzZup

    ManzZup New Member

    Joined:
    May 9, 2009
    Messages:
    278
    Likes Received:
    43
    Trophy Points:
    0
    Occupation:
    Production Manager:Software @ ZONTEK
    Location:
    Sri Lanka
    Home Page:
    http://zontek.zzl.org
    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
     
  6. pein87

    pein87 Active Member

    Joined:
    Aug 6, 2010
    Messages:
    173
    Likes Received:
    47
    Trophy Points:
    28
    Occupation:
    Web Dev
    Location:
    Limbo
    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).
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice