473,385 Members | 1,958 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,385 software developers and data experts.

event driven PHP

Maybe someone has an idea about this... I have two PHP scripts and
they would like to efficiently communicate (on a a callback or event
driven basis) with each other. If these are CLI versions of PHP, this
is not so bad because I can have the communication go across a hidden
instance of IE by means of events on IE.

But if one of the PHP instances is invoked via a server (Apache 2),
then the security restrictions become fairly severe. Specifically,
though I can create instances of IE ($ie = new
COM("InternetExplorer.Application")), the CLI versions of PHP cannot
see the 'server instances' of IE and the server PHP's cannot even query
for instances of IE (using the Windows collection of the
Shell.Application COM object). Thus, I cannot hook up the two
instances of PHP.
I thought of other possibilities. Each is essentially a way to
transfer data. I can either use VOLATILE environment variables (for
small amounts of data), or I can use http://php.net/shmop or writing
files (but I hate writing files) for larger amounts of data. All these
suffer from the same problem, however. Near as I can tell, there is
nothing to let the 'listening' side know that data has changed. It has
to keep running a loop, and checking for any possible change in data.
Of course the sending side could specify where the change has happened,
but this still requires the receiving side to be running a loop.

So my question is whether anyone has had a happy approach to the issue
of event driven programming in php? Another way to ask this is whether
php has callback functions that can be remotely triggered by
cooperating programs (e.g. the __destruct of classes is near to this -
it's effectively a callback that responds to an event: the destruction
of a class instance)

Thanks,
Csaba Gabor from Vienna.

Dec 18 '05 #1
1 2507
Have the server script listen on a port and the client script connect
to it using the socket functions.

Dec 18 '05 #2

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

Similar topics

2
by: alanrn | last post by:
For all you seasoned VB programmers this is going to be a no brainer. However, as a C programmer learning VB I'm having trouble getting my arms around the event-driven nature of VB. Suppose I...
2
by: Jonathan Rea | last post by:
Hello, Any help on the below would be much appreciated. I have an application which is rapidly getting larger and is event driven. i was wondering if anyone knew any good tutorials out there...
4
by: Deadly_M | last post by:
I have a basic VB.NET "windows application" it does not need a form and is purely event driven. At the moment when its is ran it performs the Sub Main startup then simply EXITs because all the...
0
by: kamlesh.bafna | last post by:
Hi , I am trying to design an event manger class for my Windows application. It is sort of smart client application but doe not depend on any external factors to update itself. Better term would...
3
by: msch-prv | last post by:
I am fairly new to PHP. I started creating a variety of classes (calendars, input forms, combo boxes, etc. ) but I am running into code overhead when I integrate these objects (testing for POST,...
14
by: Snor | last post by:
I'm attempting to create a lobby & game server for a multiplayer game, and have hit a problem early on with the server design. I am stuck between using a threaded server, and using an event driven...
4
by: AzizMandar | last post by:
C++ Event Coding Questions I have done some simple programs in C++ and read a lot of good C++ books (Including The C++ Programing Language, and C++ Primer) I am trying to understand and...
2
by: John Kotuby | last post by:
Hi guys, I am converting a rather complicated database driven Web application from classic ASP to ASP.NET 2.0 using VB 2005 as the programming language. The original ASP application works quite...
0
MMcCarthy
by: MMcCarthy | last post by:
VBA is described as an Event driven programming language. What is meant by this? Access, like most Windows programs, is an event driven application. This means that nothing happens unless it is...
15
by: Phillip B Oldham | last post by:
Are there any python event driven frameworks other than twisted?
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: 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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.