Re: [PHP] Shorten String or encode/decode a string

2001-05-04 Thread Christian Reiniger

On Thursday 03 May 2001 21:25, Jared Howard wrote:
 I want to shorten a string that I'll be throwing through the url.  It's
 not so much that it's too long, but it's ugly.  What it is, is my query
 string that I need to pass through to different pages, i.e. viewing
 multiple pages. Anyway, I was looking at encode and decode features but
 not really sure that they could shorten it down significantly.  Now I
 understand that I won't be able to use it, but I tried the crypt()
 function and liked how small it made it.  The string information

*g* Yess, crypt() even manages to crunch down megabytes of data to about 
10 bytes.
The problem is that it is a one-way function, i.e. you can't decrypt the 
data afterwards (it's a kind of checksum generator)...

You should use sessions or something similar - instead of passing all the 
data around on each request, store it in a database and just pass around 
the record ID

-- 
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)

...to paraphrase Churchill, while representative  democracy may be
terrible, it's still the best system that large corporations can buy.

- David Weinberger JOHO January 25, 2000

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Shorten String or encode/decode a string

2001-05-03 Thread Jared Howard

I want to shorten a string that I'll be throwing through the url.  It's not
so much that it's too long, but it's ugly.  What it is, is my query string
that I need to pass through to different pages, i.e. viewing multiple pages.  
Anyway, I was looking at encode and decode features but not really sure
that they could shorten it down significantly.  Now I understand that I
won't be able to use it, but I tried the crypt() function and liked how
small it made it.  The string information doesn't need to be secure in
anyway, just smaller (and look like nothing understandable would be good
also).



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]