/    Sign up×
Community /Pin to ProfileBookmark

AJAX continuous request….(like facebook, meebo etc..)

Ok, here’s a question I can’t seem to figure out. Facebook, Meebo, and several other heavyweight AJAX pages have an interesting feature in their chat functions. If you monitor the console with firebug, you’ll notice their ajax periodical requests run continually (as long as the AJAX timeout, default is 300sec) until an update happens, at which point it returns the JSON and starts over on another continual request.

I know for a fact that meebo uses C and C++, but facebook is running PHP (kind of), is there a way to run an ajax request to a PHP script, that only returns data when the DB is modified? perhaps it could be done with PHP’s shell_exec()? Does anyone know of a shell script with this capability?

I’m building an new opensource, flexible, portable, and very lightweight AJAX (AJAJ to be more precise) instant messenger and was wondering if this would be an acceptable option. But first I have to understand if its even possible with standard technology!

Thanks!

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@tfk11Jun 24.2008 — It's possible.

But it wouldn't make much sense to have PHP call a shell script to do a job that PHP itself is so well suited for.
×

Success!

Help @jpschroeder spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.25,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...