0

I want to to offer my users the ability to embedd a badge I give them on their own websites. However, I do not want them to be able to modify the code. This means that the href should always come back to my website.

Example:

<a href="http://example.com"><img src="http://badge.png"></a>

How can i ensure that they do not change the URL? Do i need to do some sort of iFrame or encryption?

HaveNoDisplayName
  • 8,291
  • 106
  • 37
  • 47

1 Answers1

0

You can't prevent users from manipulating code, but you can make sure on the server-side that there is only one link that delivers that badge. Add tracking or whatever you're interested in on this link.

When the users change the link, the badge won't be shown anymore.

Artjom B.
  • 61,146
  • 24
  • 125
  • 222