How To Encrypt Or Mascarade Url Using Php Encryption
- Forums
- PHP
- How To Encrypt Or Mascarade Url Using Php Encryption
This Page Contains information about How To Encrypt Or Mascarade Url Using Php Encryption By wallpaperama in category PHP with 8 Replies. [1157], Last Updated: Sat May 18, 2024
wallpaperama
Mon May 26, 2008
8 Comments
15677 Visits
hi you know what, i was wondering if this is possible
i have a website and it looks something like this:
http://www.example.com/?wallpaper_id=456
as you can see from the above url, anyone can view all my pages because its abvious that my url increments to anyone can view my wallpapers and can download with robots all they have to do is increment like this
http://www.example.com/?wallpaper_id=451
http://www.example.com/?wallpaper_id=452
http://www.example.com/?wallpaper_id=453
http://www.example.com/?wallpaper_id=454
http://www.example.com/?wallpaper_id=455
http://www.example.com/?wallpaper_id=456
http://www.example.com/?wallpaper_id=457
http://www.example.com/?wallpaper_id=458
and so on.. this is the way im getting some robots to crawl my wesbite and sometimes they just put my content on their site
so i want to have my urls like this for example:
http://www.example.com/?wallpaper_id=A32dxhsjdW
as you can see from the above, its only a code kinda like youtube if you see youtube they have have their urls like that
can you help me im not very familiar with encrypting or encoding my code.
base64_encode
you can use base64_encode php function on your scripts to hide or encrypt your real url.
for example, lets say you have your url like this:
http://www.example.com/?wallpaper_id=451
well, if you use this code:
you should see the url like this:
http://www.example.com/?wallpaper_id=NDUx
so now all you have to do is decode it in your browser like this in php:
the output will be 451
thats it
i hope that helps
https://www.wallpaperama.com/forums/how-to-encrypt-url-using-php-encryption-t6034.html