Serial Number via website address.

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
User avatar
tecktalkcm0391
DevNet Resident
Posts: 1030
Joined: Fri May 26, 2006 9:25 am
Location: Florida

Serial Number via website address.

Post by tecktalkcm0391 »

I wanted to generate a serial number, activation code, and expiration date (if applicable) restricting it to the domain registered. Any ideas on how to do this? I don't want to have requests going to a database anywhere to check if it is ok to run the code.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Come up with a (solid) algorithm to generate the serial numbers. Record ones you have generated (or make them reproducible somehow.)

If this is for a PHP project, I'd advise completely against it. You'll annoy users more often than provide something to them.
User avatar
tecktalkcm0391
DevNet Resident
Posts: 1030
Joined: Fri May 26, 2006 9:25 am
Location: Florida

Post by tecktalkcm0391 »

feyd wrote:Come up with a (solid) algorithm to generate the serial numbers. Record ones you have generated (or make them reproducible somehow.)

If this is for a PHP project, I'd advise completely against it. You'll annoy users more often than provide something to them.
I'm planning on selling something I'm working for, and I just want to make it so users can't copy it from server to server unless they have the unlimited license.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

If it's written in PHP, your code can be removed, quite easily. While it's certainly possible to sell PHP scripts, I can't see many scripts being all that viable in the marketplace.
User avatar
tecktalkcm0391
DevNet Resident
Posts: 1030
Joined: Fri May 26, 2006 9:25 am
Location: Florida

Post by tecktalkcm0391 »

feyd wrote:If it's written in PHP, your code can be removed, quite easily. While it's certainly possible to sell PHP scripts, I can't see many scripts being all that viable in the marketplace.
Thanks, I'm doing the script for myself, but after I'm done, I'm gonna try to make some money by selling it.
User avatar
tecktalkcm0391
DevNet Resident
Posts: 1030
Joined: Fri May 26, 2006 9:25 am
Location: Florida

Post by tecktalkcm0391 »

I just finished my "algorithm" and when the information below is entered it returns a Serial Number and Authorization Code. Can anyone see anything wrong with the Serial Number and Auth. Code that I should fix like too easy to crack?

Code: Select all

Domain: devnetwork.net
Expiration: Sunday, July 15, 2012
Module: Help Me Out
------------------------------------
Serial Number:             HE14-E345-691F-C43A
Authorization Code:        UTPMNE07ETTW15EVDEHEPM
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Post by onion2k »

It doesn't really matter how good your algorithm is. The point is that there's no way for you to know if someone has copied the script to 100 different servers, given it to their friends, etc. If you include something to make it "phone home" then that code can easily be removed, or the route to your website be blocked. Plus, you're a teenager (according to your signature), what are you going to do if you find someone has copied it? Sue them? Can you afford to do that?

As awful as it sounds, I think your best option is to sell the code as a script people can do what they like with. If you're open and honest with people, and you don't try to restrict them in some way, then you're a lot more likely to get sales anyway. After all, which is better ... to get 10 sales and noone copies it, or to get 100 sales and 1,000,000 people copy it? Which one makes you more money?
Begby
Forum Regular
Posts: 575
Joined: Wed Dec 13, 2006 10:28 am

Post by Begby »

Yeah, if you let them download it you can't guarantee they aren't going to copy it. There just is no way to do that. Even billion dollar companies can't prevent determined people from copying their stuff.

The only solution to is to maintain complete control over the source and never let anyone actually copy or see it, only allow them to use it. You would do this by setting up a hosted solution where you pay for the hosting and have people pay a subscription to use the software off of your server. Maybe you could have a free version and then the pay version would have more features. Checkout basecamphq.com for an example.

I have no idea what your product is, but I have also seen others release the software for free and then charge a commercial license for it. A good number of companies will pay fees for that kind of stuff even though they could probably get away with just using the software and not paying for it.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

You might also be interested in something like http://www.zend.com/products/zend_guard or a code obfuscator to prevent removing code from your script.
User avatar
tecktalkcm0391
DevNet Resident
Posts: 1030
Joined: Fri May 26, 2006 9:25 am
Location: Florida

Post by tecktalkcm0391 »

Thanks for all the replies, they all helped. Can you copyright you PHP codes?... just and idea, i know it wont help. :?
User avatar
Ambush Commander
DevNet Master
Posts: 3698
Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US

Post by Ambush Commander »

Copyright is automatic.
User avatar
tecktalkcm0391
DevNet Resident
Posts: 1030
Joined: Fri May 26, 2006 9:25 am
Location: Florida

Post by tecktalkcm0391 »

Ambush Commander wrote:Copyright is automatic.
Elaborate please. So I don't need a U.S. Copyright?
User avatar
Chalks
Forum Contributor
Posts: 447
Joined: Thu Jul 12, 2007 7:55 am
Location: Indiana

Post by Chalks »

Wikipedia wrote:In the United States, copyright has been made automatic (in the style of the Berne Convention) since March 1, 1989, which has had the effect of making it appear to be more like a property right. Thus, as with property, a copyright need not be granted or obtained through official registration with any government office. Once an idea has been reduced to tangible form, for example by securing it in a fixed medium (such as a drawing, sheet music, photograph, a videotape or a letter), the copyright holder is entitled to enforce his or her exclusive rights.
So if you write it down somewhere, it's yours.

You could add a comment block to the top of all source files saying "this is my code, I made it in YYYY MM DD, and if you use this code, preserve this copyright notice, please". If you search for scripts that you can use online, you'll find a lot of stuff like that.



http://en.wikipedia.org/wiki/Copyright
User avatar
tecktalkcm0391
DevNet Resident
Posts: 1030
Joined: Fri May 26, 2006 9:25 am
Location: Florida

Post by tecktalkcm0391 »

Thanks! Awesome.
Post Reply