To create a licensing mechanism you need a way to correctly identify that the code is on the right website. You will need to look at your PHP variables and see what are workable self-identifying tags.
Then, you need to encrypt those tags, so that they aren't so easy to track down. Embed them in a file who's name is also an encrypted varient of your customer's website name. Your code will need to look for this encrypted filename, based on the encrypted name of its self locating PHP variables. Then, your code needs to properly decrypt the license key variables and see if they match the current web site they are on. If they match, execute the code. If not, it doesn't work.
One caveat: Some people like to go to www.somesite.com, while others like to go to somesite.com (minus the www). You probably will need to generate two license keys if it's a public website.