Hello,
that constant has been deprecated since PHP 8.1, which means you should receive a warning instead of an error.
The PHP manual suggests using htmlspecialchars to address this issue, but you can also consider using FILTER_UNSAFE_RAW as an alternative solution.
Change this:
$screen_name = filter_var( $_GET["page"], FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH );
To this:
$screen_name = filter_var( $_GET["page"], FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_HIGH );