How do I get the url from the address bar and try to sanitize it to prevent cross side scripting?
For example in this link,
www.somesite.com/login/login.php
how do I prevent it from
www.somesite.com/login/login.php/"><h2>This%20is%20our%20cookie<h2>
<script>document.write%28document.cookie%29</script></h2>
Do I use the $_SERVER to get the url from address bar then what should I use to sanitize the link?
Thank you.