Link to home
Start Free TrialLog in
Avatar of DReade83
DReade83Flag for United Kingdom of Great Britain and Northern Ireland

asked on

Real-Time communication between PHP and Flex application

My client wants to replace "refresh" buttons in their Flex/PHP application with real-time refreshing, so as data changes it's pushed to the client.

I've come across a few articles that cover this subject but am struggling to find the best approach. Can anyone suggest any possible solutions?

Any help would be appreciated. Thanks in advance.
Avatar of PankajRai
PankajRai
Flag of India image

the best solution as per my understanding is:

1. create a custom object and bind this object with flex component call setData() method to refresh.
2. write a refress() method in FLEX.
3. when  real time refreshing occur- cal this refress() method from PHP (java Script).

How to call this Method from PHP:

Flex Code
function refresh(data:object):void
{
    // TODO: Refresh the flex application
}
ExternalInterface.addCallback("myFunction", refresh);


// Java Script code
<script language="JavaScript">
   flashObject.myFunction(data);
</script>


SOLUTION
Avatar of edchipman
edchipman
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of DReade83

ASKER

Is that classed as "long polling"? Should I be using persistent connections with Apache or is that not recommended?
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial