How to encrypt a link in the source code page so that when viewing the source code page, the link is not visible in the source code page?
How to hide the
http://10.60.116/wordpress/output/stream /media.php?vname=01_metka_video In this case?
Answer 1, Authority 100%
This in general is quite simple to do, but the question here then becomes different: how many people do not guess about the presence of an encrypted link in the code. And the answer is simple here: an overwhelming minority, among which are predominantly computer-free people. After all, to directly use the reference, you will have to decipher it in any way (whatever you encrypt it) to get the content that it carries. In this case, as you have already been told above, even with the source code do not have to deal – it will be enough to look into the network stack located in many modern browsers and to find out about everything that you tried to hide.
If you do not plan to download any content to the “secret” link, you can encrypt it using any bidirectional encryption algorithm (which allows the decryption), for example, BASE64; You can at least come up with. But a person knows anyway sooner or later finds out the encryption algorithm or simply in a certain place of the JS code will produce an injection of its code similar to this:
... var myencryptedurl = "gerpiuiwr3284902% & amp; * 8 ^%"; ... var MyDecryptedURL = DecryptMysuperseCretURL (MYENCRYPTEDURL); Alert (MyDecryptedURL) ...
And you can use the open URL in general, on which, for example, a script will be located, pulling off the content from the secret URL and gives it to the client. So in this case, the search for a reliable URL is really more complicated.
@ DemonicQ2014 depends on the nature of the desired encryption. In fact, you can simply use the so-called “Caesar algorithm”, shifting the symbol codes in the prevail.
I can not say for sure whether it is cross-browser … anyway explore.