I require a shell script to be written in PHP that will initiate a connection to a remote server and send out one command every 5 seconds throughout a 24 hour period. That would be 432,000 times in a day. In addition to sending out the command 5 times a second, the script must also be reading through the results looking for a specific letter to show up at the end of the line in each response. As soon as that response is found, an email must be sent.
The parsing must NOT parse each response as it comes and then send out the next command, it must continually send out 5 a second and once the letter required is found at the end of the response line, the commands must be stopped from being sent and an email dispatched FAST.
This is a short script but requires the best efficiency of code. I will only accept this in PHP as it is somewhat faster than Perl I am led to believe. This script will be access via SSH.
Just to clarify, there will be ONE single command being sent out 5 times a second which never changes. The responses follow a set format and it is dependent on the last letter of the response as to whether or not to stop sending requests and send the email.
Any questions please ask. No timewasters, this is just a small project.
2) Deliverables must be in ready-to-run condition, as follows (depending on the nature of the deliverables):
a) For web sites or other server-side deliverables intended to only ever exist in one place in the Buyer's environment--Deliverables must be installed by the Seller in ready-to-run condition in the Buyer's environment.
b) For all others including desktop software or software the buyer intends to distribute: A software installation package that will install the software in ready-to-run condition on the platform(s) specified in this bid request.
3) All deliverables will be considered "work made for hire" under U.S. Copyright law. Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement).
PHP on CentOS
Accesible and operable via SSH
Code never to be redistributed again
For internal company use