About this question
Is this script vulnerable to PHP or JS code injection? In my quick test I changed the useragent to a PHP script but it will not be executed just printed. If I change the user agent to a javascript code I receive a connection refused by the webserver. So am I safe with this type of script?
<?php
$u=$_SERVER['HTTP_USER_AGENT']
?>
<html>string
<?php echo $u; ?>
</html>