Encode part of a URL. Is there a better way than this?
>> will become '....../cust1.php?xid=72 (or whatever)
>> I want to hide the number.
>> something like .../cust1.php/?xid=MWYca
> Do you realize that this would always yield the same encoded number? So a
> visitor would still know that the id is the same as yesterday's id, if both
> link to the very same customer. Obviously, your encoded ID will be harder
> to adjust to get a different number (when seeing 72 one might change it to
> 73), I know. Just to make sure you understand that this way of encoding
> always gives you the same output for the same input.
> When it is really important to really hide such things, you could also think
> about not putting them in the HTML at all, but keep the IDs at the server
> side using PHP's sessions. Session support in PHP works fine, although it
> might be overdone for your situation.
Your point is well taken and I've decided not to use base65. Instead, I found
a simple encryption class called AzDGCrypt (from phpclasses.org) and I use
this. I create random keys (seeds) and keep those as session vars (so I can
Thus, in one instance xid=72 would look like
and on another
What I'd REALLY like to do is find a way to CHANGE the URL (see other