Building a remote notification system

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
knightu42
Forum Newbie
Posts: 3
Joined: Tue Feb 10, 2009 4:02 pm

Building a remote notification system

Post 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!
knightu42
Forum Newbie
Posts: 3
Joined: Tue Feb 10, 2009 4:02 pm

Re: Building a remote notification system

Post by knightu42 »

Could anyone offer me some insight?
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: Building a remote notification system

Post 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.
There are 10 types of people in this world, those who understand binary and those who don't
knightu42
Forum Newbie
Posts: 3
Joined: Tue Feb 10, 2009 4:02 pm

Re: Building a remote notification system

Post 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.
User avatar
php_east
Forum Contributor
Posts: 453
Joined: Sun Feb 22, 2009 1:31 pm
Location: Far Far East.

Re: Building a remote notification system

Post by php_east »

probably https would do you well.
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: Building a remote notification system

Post 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.
There are 10 types of people in this world, those who understand binary and those who don't
Post Reply