Hi All,

I want to know how to write a php script that run in background in browser when anyone login.

Recommended Answers

All 2 Replies

Keep in mind that browsers don't execute PHP - only your server does that.

You might be able to do this by writing some JavaScript that uses AJAX to periodically execute your PHP script. You'll need to limit the frequency of the AJAX calls or you risk bogging down both the user's browser and your server.

It depends on what type of script you want to run in the background. You need to give us more information. Speculation is not a good thing.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.