Skip to content

Instantly share code, notes, and snippets.

@hehe24h
Created April 4, 2019 05:50
Show Gist options
  • Save hehe24h/85e08faf9bc4b8ccc154c96fcb2d35fc to your computer and use it in GitHub Desktop.
Save hehe24h/85e08faf9bc4b8ccc154c96fcb2d35fc to your computer and use it in GitHub Desktop.
PHP chuyển trang Redirect
<?php
function devCheckInput($data) {
$data = trim($data);
$data = stripslashes($data);
$data = htmlspecialchars($data);
return $data;
}
if (!empty($_SERVER['QUERY_STRING'])) {
$queryString = "?" . devCheckInput($_SERVER['QUERY_STRING']);
} else {
$queryString = "?utm_source=Direct&utm_agent=Direct&utm_content=Direct&utm_campaign=Direct&utm_medium=CPC&utm_team=Direct&product=";
}
header("Location: https://domain.vn/$queryString");
die();
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment