Welcome. Took it into his head to make the site such a chip: the authentication by a unique number. That is, it's simple: you score the number in the box and get an answer whether this number in the database and, accordingly, legally if the goods have been sold. You can create database mysql or just keep to the text file.
Actually, the question is: are there any finished/semi-finished/unfinished solution for this?