Skip to content

Instantly share code, notes, and snippets.

@kooler62
Last active August 29, 2015 14:20
Show Gist options
  • Select an option

  • Save kooler62/8d36c0dd202749968dbc to your computer and use it in GitHub Desktop.

Select an option

Save kooler62/8d36c0dd202749968dbc to your computer and use it in GitHub Desktop.
xss
<?
trim(htmlspecialchars($_GET[post]));
//для страниц $_GET[page]
//защита от отрицательных, нулевых, спец знаков
if (empty($_GET[page])) {
$vid=0;
}else{
//10 количество выводимих элементов на странице
$vid=(abs((int) $_GET['page'])-1)*10;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment