Levi Z has asked for the wisdom of the Perl Monks concerning the following question:
A Perl script on a raspberry pi that checks a website on the INTERNET every 3 seconds for updates... On the website is a number, say 1 or 2.. The Perl script does something depending on the 1 or the 2.
I still have 1 PHP webpage, now with 1 button. If i push this button a 1 magically turns into a 2 or the other way around. when this button is pressed a want to send a "trigger" to my RPi so my perl script can take over.. In this way my Perl script does not have to check the website like 26400 times a day and it still reacts fast.
I was thinking about a tcp packet?? I can when i start my Perl script, send my IP-adres to the website and store it in a DB to use later. If this could be the best option i found some examples but they are all different and the only thing 1 need is sending 1 digit or letter.. just a trigger.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: trigger perl script from remote php script.
by BrowserUk (Patriarch) on Jan 03, 2015 at 00:54 UTC | |
by locked_user sundialsvc4 (Abbot) on Jan 03, 2015 at 13:33 UTC | |
|
Re: trigger perl script from remote php script.
by Perlbotics (Archbishop) on Jan 02, 2015 at 23:31 UTC | |
|
Re: trigger perl script from remote php script.
by Levi Z (Initiate) on Jan 04, 2015 at 10:42 UTC | |
|
Re: trigger perl script from remote php script.
by Levi Z (Initiate) on Jan 04, 2015 at 00:17 UTC | |
by BrowserUk (Patriarch) on Jan 04, 2015 at 01:18 UTC |