I am looking for the best way to trigger events from within a PHP script, on an existing server running on the same machine as my EventGhost instance. I played with the Webserver plugin, but I don't want my entire existing server in that setup.
So I am looking for a way, from within existing server setup, do a program-to-program call to EventGhost.
Can someone point me at the way to do this, and which plugin to use?
Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
triggering events from PHP script
Re: triggering events from PHP script
- Load the webserver plugin and make a php client that uses http request to trigger events in EG.
- Load the network event receiver plugin and make a php client that uses a tcp socket to trigger events in EG.
- You can run "EventGhost.exe -e event" command (check command line syntax from http://www.eventghost.org/wiki/Command-line_reference)
These are the best ways that I can think of right now. Obiviously the first two will allow you to connect to other machines running EG as well as they work over the network.
- Load the network event receiver plugin and make a php client that uses a tcp socket to trigger events in EG.
- You can run "EventGhost.exe -e event" command (check command line syntax from http://www.eventghost.org/wiki/Command-line_reference)
These are the best ways that I can think of right now. Obiviously the first two will allow you to connect to other machines running EG as well as they work over the network.
-
jsonnabend
- Experienced User
- Posts: 127
- Joined: Wed Apr 23, 2008 7:35 pm
Re: triggering events from PHP script
As a variation of jinxdone's third option, you can use the -n command line switch to trigger events, even over a network. See the wiki entry.
- Jeff
- Jeff
Re: triggering events from PHP script
Ah yep, indeed, I missed that one.
I think php is mostly run on apache running on linux so probably coding a bit of php (options 1 and 2) that wont be dependant of the eventghost.exe is the best option. If you do make a nice php function to trigger events in EG though the network sender for example please do post it here on the forum/coding corner.
I think php is mostly run on apache running on linux so probably coding a bit of php (options 1 and 2) that wont be dependant of the eventghost.exe is the best option. If you do make a nice php function to trigger events in EG though the network sender for example please do post it here on the forum/coding corner.
Re: triggering events from PHP script
I run EasyPHP, an Apache implementation, under Windows XP.jinxdone wrote:Ah yep, indeed, I missed that one.
I think php is mostly run on apache running on linux so probably coding a bit of php (options 1 and 2) that wont be dependant of the eventghost.exe is the best option. If you do make a nice php function to trigger events in EG though the network sender for example please do post it here on the forum/coding corner.
Calling EG via the commandline option would work I suppose, although performance worries me somewhat. But I'll give it a try.
The other options sound more technically appropriate, but also a lot more work. I'll see if I can find some time to work it out... when I do, will let you know!