Page 1 of 1

Building a remote notification system

Posted: Mon Feb 23, 2009 10:07 am
by knightu42
I'm having trouble finding relevant information on Google so I thought I'd take my question to the forums.

I'm creating a script that can notify me about a user's previous backup, and if they haven't, then it will email them to do it. A couple days later, it'll email me to go bother them. I've figured out everything I need to do on each client machine, but I'm having some trouble finding the best notification method. At the moment, I've got it set up to email me, using the clients' sendmail. But that might not always work or make it through spam filters.

I'm thinking I might be able to have a very basic php page that reads get requests, and the clients can just run curl with variables from their machine. Then the server with the php page would read the get variables and save them to a database. At night, I could check the database for those that it's been a while since the last backup and have it notify me.

Does this seem too complicated? I'm really a php novice but it seems simple in theory. I'm concerned about security and validation, as I don't know the best solutions to either. Is there perhaps an open-source project already out there that I can utilize?

Thanks!

Re: Building a remote notification system

Posted: Tue Feb 24, 2009 9:14 am
by knightu42
Could anyone offer me some insight?

Re: Building a remote notification system

Posted: Tue Feb 24, 2009 9:39 am
by VladSun
knightu42 wrote:I'm thinking I might be able to have a very basic php page that reads get requests, and the clients can just run curl with variables from their machine. Then the server with the php page would read the get variables and save them to a database. At night, I could check the database for those that it's been a while since the last backup and have it notify me.
Sounds good to me :)
You can even make this "basic PHP page" to notify you in any way you want - email, email2SMS etc.

Re: Building a remote notification system

Posted: Mon Mar 02, 2009 11:15 am
by knightu42
Do you know of any good tutorials (or even books) that could point me in the right direction in regards to security and data validation? I've read many PHP for dummies type things and written a handful of PHP pages from the information I've learned there, but they can have random bugs for reasons unknown to me and are probably vulnerable in some fashion.

Thanks for the reply.

Re: Building a remote notification system

Posted: Mon Mar 02, 2009 2:07 pm
by php_east
probably https would do you well.

Re: Building a remote notification system

Posted: Mon Mar 02, 2009 2:13 pm
by VladSun
You could use HTTPS and install certificates from you client machines (or any other public/private key authentication).
Or you could use shared key system (symmetric key data encryption or HMAC - search in this forums for implementation).

Either of these approaches guarantee that data you received has not been modified and it's source is the one you expected it to be.

Sorry, I don't know any tutorials or books about this.