how we can protect a website from "Cross-Site Scripting Phishing Through Frames" by php..
thanks
how we can protect a website from "Cross-Site Scripting Phishing Through Frames" by php..
thanks
The following script can help:
<script type="text/javascript">
if(top.frames.length > 0) {
top.location.href = self.location;
}
</script>
If you include this in each of your pages, then you're basically checking that there aren't multiple frames on the top page. Obviously it only works if your site doesn't itself use iframes (for example, for serving ads).
However, the best defence against phishing scams is to:
Cross site Scripting mostly occurred via url
Like http://www.example.com/index.php?q="><script>alert('SSS')</script>
If your index.php page contain
echo $_GET['q'];
You will receive a alert. So that user can grab your cookies also insert malicious code into your web. So make sure you are using all GET and POST variable with validation.