-
Website
http://www.billda.com -
Original page
http://www.billda.com/php-remote-kill-switch -
Subscribe
All Comments -
Community
-
Top Commenters
-
resumebuilder
1 comment · 1 points
-
bcamp1973
1 comment · 1 points
-
trade your asset
1 comment · 1 points
-
dedcenter
1 comment · 1 points
-
Dharmesh Shah
1 comment · 4 points
-
-
Popular Threads
Thanks for saying something. The file should be good to go now. Let me know if you have any further problems.
- Bill
the "server" module unchanged, and you'd only have to rewrite the "client"
bit in ASP and work it into whatever final code you have...the HTTP
responses can still be understood by ASP I believe...
Assuming you've probably documented the project scope, the clients needs and you gave regular updates to them about the project on which you received feedback(you communicate clearly and regularly with them). You also will have a legal agreement/sales contact or whatsoever which states scope, deadlines, mutual expectations and prices/payment.
This will avoid any "kill switch" constructions, backdoors and unethical control of clients property(the switch will still be in placeeven when a client has paid his bills). I personally find this bad webdevelopment practice.
I agree - everyone would prefer not to resort to things like this. The unfortunate reality though is that some clients don't pay - I'm glad you haven't personally experienced it.
As I mentioned in the disclaimer in the post, any and all backdoor code should be removed as soon as a client has paid his final bill, and certainly before the site goes live.
Any technical measures are a safety net in case normal methods of recourse break down.
I still maintain the opinion that when you do your stuff right and check your clients financial situation especially when you're talking about large amounts of money. You won't need something as unethical as this. Backdoors are bad programming practice. It's comparable to rootkits or DRM. You can't withdraw ownership from your client. It's a matter of bussiness and people skill. I'm not saying that the chances are zero to encounter lousy clients. You can always ultimately resort to legal action (that is if you have legal proof, which also helps with negotiating payment ;))
Nice job.
although you'll probably have their ftp info
and can just remove the unpaid for content.
any laws/regulations on digital content that is on a clients server?
that would be interesting to read up on
There is of course a number of obvious issues with having this sort of thing in your code:
1. Unless you "kill switch" actually removes some critical part (or all) of the application it could easily be enabled by anyone that was slightly tech-savy.
2. Implementing the "kill switch" to prevent it being enabled again could potentially leave a big security hole (there's ways around this of course).
2. If your client ever found out about the "malicious" code (whether it was used or not) it would cause massive problems.
Again I'd like to reiterate - the killswitch is a safety net in case negotiations with the client break down. You should remove it as soon as you've been paid.
on another note. the code should default to allowing the site to run if it takes too long to contact your site or the site is not available.
I hate to go this far, and luckily I never actually had to disable any website (the threat alone worked), but to me in these 'worst case scenarios' it makes me a feel a bit better knowing that they can't just change their FTP info and call it a day, without ever paying me.
That said, you might want to change the warning message to display a more general warning. Even though you only save this as a last resort, it would be much better if possible visitors don't see this warning of the client having to pay you (which could ruin their business), but instead show a more general, please contact support or the like message.
Oh, and it would also help to not let the code talk with your server at *every* load. Maybe do it like wordpress does it's version checks; only 2 times a day (and in wordpress' case, only the admin panel does the checks).
Thanks for the post!
-Dave
thanks for that
The site continued to run!
BTW it's pretty easy to have this 'kill switch' disabled... Just a minimal techie changes:
if (!$client->query('activation.checkapp', $appname)) {
if($client->getResponse() ) {
die("Application Disabled. Please pay your web developer.");
}
}
Into:
/*
if (!$client->query('activation.checkapp', $appname)) {
if($client->getResponse() ) {
die("Application Disabled. Please pay your web developer.");
}
}
*/
And the code for 'disabling' is changed into 'comment' and thus not executed...
Also changing the if (...) into if (false) and again it has no affect...
I've had personal experience of client's withholding payment for the full spectrum of possible reasons! In my opinion it is nice to have a kill switch option, but understand those that are worried by its ethical implications.
I've posted my approach at http://ajaxkillswitch.com
It demonstrates a VERY simple technique that takes advantage of jQuery's recently added cross-domain Ajax request functionality.
The advantage to the JavaScript Ajax kill switch is that it is independent of the server-side implementation. This makes it useful for even standard HTML websites.
Combination of the two methods (server and client-side) could be doubly effective ;)
Thank you.