简体   繁体   English

用PHP加密URL参数并用Javascript解密

[英]Encrypt URL parameters in PHP and decrypt in Javascript

I have the following situation - online coloring pages that work in JavaScript. 我遇到以下情况-可在JavaScript中工作的在线着色页。 I'll be passing the coloring image URI to the script. 我将把着色图像URI传递给脚本。 I'd like to encrypt that URI somehow so that it's not that easy for bots to download my coloring images: 我想以某种方式加密该URI,以使机器人下载我的着色图像并不容易:

http://01smile.com/products/games/html5games/coloringbook_3%28mass%20parameter%20beta%29/index.html?i=http://01smile.com/products/games/girl.gif&p=http://01smile.com/products/games/paper.png http://01smile.com/products/games/html5games/coloringbook_3%28mass%20parameter%20beta%29/index.html?i=http://01smile.com/products/games/girl.gif&p=http:// 01smile.com/products/games/paper.png

So the above link will be pasted on a page generated with PHP. 因此,以上链接将粘贴在使用PHP生成的页面上。

What encryption procedure could I use in PHP to encrypt the image URI that would I then be able to decrypt in JavaScript? 我可以在PHP中使用哪种加密程序来加密图像URI,然后可以在JavaScript中对其进行解密? I'm not looking for some high level of security - just to deter scraper bots. 我并不是在寻找更高的安全性-只是为了阻止刮板机器人。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM