atom feed3 messages in com.googlegroups.professional-php[Pro. PHP Dev.] Re: String Compressio...
FromSent OnAttachments
NateNov 6, 2008 2:52 pm 
Robert GonzalezNov 7, 2008 9:15 am 
NateNov 7, 2008 9:21 am 
Subject:[Pro. PHP Dev.] Re: String Compression and Encryption
From:Robert Gonzalez (
Date:Nov 7, 2008 9:15:54 am

Does the URL have to be compressed or can it be mapped to something smaller? What I mean by that is can you put together a rewriter that accepts a url like http://mysite/gf54 and have the gf54 be a key that maps to the full URL you really want to do to?

What I am thinking is a relationship handled by a database or file backend that would house the maps, by the way.

On Thu, Nov 6, 2008 at 2:52 PM, Nate <> wrote:

Who can make this string the shortest and have it (at least somewhat) encrypted and be URL friendly?

$str = ' 1225962206::345::DataName::otherchars::CC0033:: search?q=php+compression+and+encryption&sourceid=navclient- ff&ie=UTF-8&rlz=1B3GGGL_enUS288US288&bb=3DB6lV3zqQSSbW6GZ3osAOox6H3DL %26ai<>

%3DB6lV3zqQSSbW6GZ3osAOox6HNA9a5j2WUrs3aA8f11gWw4y0CjgBUIDvts37_____wFgyQbIAQHIAtTZtgHZA9NKiQCjgBUIDvts37_____wFgyQbIAQHIAtTZtgHZA9NKNA9a5j2WUrs3aA8f11gWw4y0QBhgGIOiu9wEoCjtwKmQ4yjW0yZTDtQVgOXyHbA_AjDQ %26q%3gyQbIAQHIAtTZtgHZA9NKiQ9j6Kpum%3D6%26sig%3_OU%253D50%2526domainid %253D47%2526detid%253D1800191985%2F%260%3D %261%3D0%264%3yjW0yZTDtQVgOXyHbA_AjDQ%26q%3DtgHZA9NKiQ9j6Kpn%26num %3D6%26sig%3DDAGe %2617%3D8%2618%3D6%2619%3D1%2620%3D8%2621%3D0%2622%3D1E2mDGwdGLM%3D

%2640%3D0Ytcx614%3D245874%2615%3da8aae53fc901%b96d096a399dc1db5da7cd9976d2ef5074be2d50efeb30f1fb6b546d48d21bfe300c93a4888e310a114330e38b1a6d70c4f67ebc5f81c7ca6058a11c34620da8f193a8cb65067ed11011b130b287a9b34035eee6f8362f757d38be92cae4996bc97c8cf6948a5ff88e41a666485a1bac1075d0c2846a74441d8945a3385f425e9ccfd572c5b890a62610%3D1%2611%3DiWqtwKmQ4yjW0y::Mozilla %2F5.0+%28Windows%3B+U%3B+Windows+NT+5.1%3B+en-US%3B+rv %3A1.9.0.3%29+Gecko%2F2008092417+Firefox%2F3.0.3'

Here are the strlens from my tests using base64_encode on the final output (besides the original of course) original: 1152 gzdeflate: 952 gzencode: 976 gzcompress: 960 mcrypt_des of a gzdeflated $str: 952 (MCRYPT_DES, MCRYPT_MODE_CFB, MCRYPT_DEV_URANDOM)

My number one goal is to make it as small as it can be.

Thanks -nate-

-- Robert A. Gonzalez

--~--~---------~--~----~------------~-------~--~----~ This group is managed and maintained by the development staff at 360 PSG. An
enterprise application development company utilizing open-source technologies
for todays small-to-medium size businesses.

For information or project assistance please visit :

You received this message because you are subscribed to the Google Groups
"Professional PHP Developers" group. To post to this group, send email to To unsubscribe from this group, send email to For more options, visit this group at -~----------~----~----~----~------~----~------~--~---