Need help with URL encoding

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jeephp
Forum Newbie
Posts: 16
Joined: Sat Apr 23, 2005 4:42 am

Need help with URL encoding

Post by jeephp »

Hi,
I need some help with URL encryption or something similar. For example I have a URL http://www.myurl.com/search.php?iu=321x ... &u=12qazxq but I do not want it to be displayed with the parameters rather I would like it to be displayed as http://www.myurl.com/search.php?id=eru3 ... 47ueir3948

What is the best and the most secure way to do this in PHP, I am developing the site on Windows 2003 Enterprise Server Platform and hosting in IIS 6.0.

Does PHP have some inbuilt function to do this or I would have to use a 3rd party tool for this.

Any advice on this would be highly appreciated.

Thanks
User avatar
anjanesh
DevNet Resident
Posts: 1679
Joined: Sat Dec 06, 2003 9:52 pm
Location: Mumbai, India

Post by anjanesh »

For Apache you can use mod_rewrite
Since yours in IIS, you can display links encrypted using mcrypt functions.
Using url_encode is of no use here because any can url_decode the link. You'll need to encrypt it with some key.
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

It appears you are trying to reinvent http://www.php.net/sessions
Post Reply