I gave up // Check the user didn't shamelessly two-time us with another site.
// if (parse_url($http_referer, PHP_URL_HOST) != $_SERVER['SERVER_NAME']) {
// return FALSE;
// }
it and it did not shows error.