473,407 Members | 2,312 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Background process/multithreading in PHP??

Hi Folks,
I use PHP for a user login application and it works fine. The problem
is that another process should start up as soon as the user logs in and
should keep on displaying different popup messages every 5 minutes. Is
there a way I can implement this using PHP?

Basically the idea is to get a background process running, thats it.

thanks
Cricket

Dec 2 '05 #1
6 2083
cr*********@yahoo.com wrote:
Hi Folks,
I use PHP for a user login application and it works fine. The problem
is that another process should start up as soon as the user logs in and
should keep on displaying different popup messages every 5 minutes. Is
there a way I can implement this using PHP?

Basically the idea is to get a background process running, thats it.

Hi,

The easiest way to annoy your visitors with popups is javascript.
You don't need any background PHP process, which don't even exist AFAIK.

With JS you can easily make a timer that will popup some page every X
seconds. Beware however that many people have popupblockers, just because
unsolicited popups are an annoyance.

Regards,
Erwin Moller
thanks
Cricket


Dec 2 '05 #2
C.
PHP is a serverside language. HTTP is a strict client-server stateless
protocol - a process created serverside can initiate communication with
the client via HTTP.

You could create a mini-script and prepend it to every other page
which:

1) checks when the user last accessed a page
2) if its more than 5 minutes ago insert javascript to ctreate the
popup in the current page

but beware of messing up the headers from the subsequent page.

C.

Dec 2 '05 #3
To output so many pop ups with JavaScript would be impossible, you
should defiantly use Fortran. That's the ticket. ;)

Dec 2 '05 #4

Erwin Moller wrote:

The easiest way to annoy your visitors with popups is javascript.
You don't need any background PHP process, which don't even exist AFAIK.

With JS you can easily make a timer that will popup some page every X
seconds. Beware however that many people have popupblockers, just because
unsolicited popups are an annoyance.


That's why one should use in-page DHTML ads instead. They're far harder
to defeat. Got Javascript disabled? That just means you can't close the
ad window, sucker!

Dec 2 '05 #5
Ian
Chung Leong wrote:
Erwin Moller wrote:
The easiest way to annoy your visitors with popups is javascript.
You don't need any background PHP process, which don't even exist AFAIK.

With JS you can easily make a timer that will popup some page every X
seconds. Beware however that many people have popupblockers, just because
unsolicited popups are an annoyance.

That's why one should use in-page DHTML ads instead. They're far harder
to defeat. Got Javascript disabled? That just means you can't close the
ad window, sucker!

So you use adblock, unless you are stuck with an old browser....

Ian
Dec 3 '05 #6
you don't need a background process
well, if you want to display the popup while the user is navigating,
just use a Session variable (with the time when the next popup should
appear).

Dec 5 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: haptiK | last post by:
Hello, can i use php to multithread mail() or something similar? in my company i need to send multiple copies of email to a few hundred ppl affilated and on my list. instead of calling mail...
8
by: Wim | last post by:
My GUI application starts a process (a console program) when the user hits Play. I would like to add an option to pause that process. The code I've added to detect if the user hit pause/unpause...
2
by: Paul Hatcher | last post by:
I have an ASP.NET application that uses a background threads to perform a long-running process. What I'm not sure is how to track and communicate with the thread. The site is divided up into...
8
by: John Rugo | last post by:
Hi All, I have an app the runs something, for instance copies a file. During this time my app is locked up. I have tried throwing a bunch of DoEvents in but nothing happens to allow me to work...
1
by: hsmcdonald | last post by:
Hello all, I have a mail function that sends parsed information to an employee distribution list. I was trying to setup a process where the admin can initiate a letter to this list, and...
5
by: Chris | last post by:
What would be the simplest way to make an app wait for one process to finish before starting the next process? Example /// FileCopy(strPath & "test.mdb", strPath & "live.mdb") Wait(Until...
7
by: Ray | last post by:
Hello, Greetings! I'm looking for a solid C++ multithreading book. Can you recommend one? I don't think I've seen a multithreading C++ book that everybody thinks is good (like Effective C++ or...
2
by: Anbu | last post by:
Hi all, I'm creating processes of a console based application. After proc.Start() the process is not getting terminated and the thread keeps waiting for some reponse from the process. Now I need...
32
by: John Wright | last post by:
I have a long process I run that needs to be complete before the user can continue. I can change the cursor to an hourglass, but I want to update the Status Strip on the bottom during the process. ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.