$current_url=str_replace(array("?refresh=${secret_string}","&refresh=${secret_string}"),'',"http://${_SERVER['HTTP_HOST']}${_SERVER['REQUEST_URI']}");//clean up the URL
$current_url=str_replace("?refresh=$secret_string",'',$current_url);//clean up the URL