
Andrei Orghici - 2011-02-02 07:59:04
As you get host name and host ip when validating a serial number this class won't work in cli mode, which can be bad as you might want to validate a serial number in background process or in an api call.
// get host name
function get_host_name()
{
return $_SERVER['HTTP_HOST'];
}
// get host ip
function get_ip_address()
{
return $_SERVER['REMOTE_ADDR'];
}
You could add setters for ip and host names.