Skip to content
Permalink
3481a87158
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
24 lines (18 sloc) 514 Bytes
<?php
class Http {
public static function redirect($url, $params = []) {
$query = empty($params) ? '' : '?' . http_build_query($params);
header('Location: ' . $url . $query);
exit();
}
public static function cookie($name) {
return isset($_COOKIE[$name]) ? $_COOKIE[$name] : null;
}
public static function remove_cookie($name) {
setcookie($name, "", time() - 3600);
}
public static function post_params() {
return $_POST;
}
}
?>