shrink integers with php

function chr_enc( $id ) {        $c = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';        $id = (string)$id;        for( $i = 0; $i < strlen( $id ); $i++ ) {                $x .= $id{$i};                if( $x > 9 && $x <= ( strlen( $c ) + 9 ) ) {                        $n .= $c{$x-10};                        $x = '';                }                elseif( $x > strlen( $c ) + 10 || $x == '0' || $i == ( strlen( $id ) - 1 ) ) {                        $n .= $x;                        $x = '';                }        }        return $n;}function chr_dec( $id ) {        $c = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';        for( $i = 0; $i < strlen( $id ); $i++ ) {                $n .= ( !is_numeric( $id{$i} ) ) ? ( strpos( $c, $id{$i} ) + 10 ) : $id{$i};        }        return $n;} example: 212408898 => lo08898 30028247 => u0so7 11222207 => bmm07 94070738 => 94070738 81071369 => 81071A9 197309119 => j73091j 15018738 => f0i738 78584770 => 78WL70 191854002 => jiS002 188192516 => i8192P6 65437343 => 65H73H 124061870 => cEZ870 207003851 => k700CP 218431612 => l84vZ2 5688664 => U88664 162528033 => gps0x 57489904 => VM9904 89269087 => 89q9087 193413083 => jyd083 144121183 => eFli3 218427866 => l84r866 57912246 => V91mK 229392376 => m9392B6 56443324 => UIxo 34996219 => ...

a fresh debian 4.0 etch, lighttpd, php, mysql, mod_geoip installation with maxmind database and visitors webstats, monitored by runit

its fuckin' big i know. but its cool. we start from a complete plain installed debian etch 4.0. one line is one command. apt-get update if this error shows up: W: GPG error: http://ftp.de.debian.org etch Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A70DAF536070D3A1 NO_PUBKEY B5D0C804ADB11277 ... try this: apt-get ...

the future of marketing domains - domain hacks

ever heard of something called "domain hacks"? i own a few funny domains where the tld is part of the word itself... as a simple example take "damn" there is a tld called .mn from mongolia - so da.mn would be a very cool domain, dont you think? now take this idea ...

ESS: The Real Desert Scraping

ESS stands for "Eli said so" ;) as you can read in the latest article on bluehatseo.com, eli explained a technique how to dig deep in the net for "fresh" content. let me cut those steps down: 1. buy a domain name and setup wildcard subdomains 2. find a site where you can ...

the cookie backer (php)

a few weeks ago i wrote two alternatives for the not yet implemented "http_parse_cookie" and "http_build_cookie" functions:

smarty function for a normalized meta tag keywords

i set up some product catalogues with the csv files from affili.net and i needed a function for smarty to create a nice looking keyword list for the meta tag. that's why i wrote this modifier function to use it directly in the templates:

myspace.com login function (php, curl)

this little login function is for beginners. it uses curl and a cookiejar. on success it returns the hash for the cookiejar under /tmp/ that you can use it with different accounts at the same time. have fun:

Colophon

Donec ac nisi in lectus euismod sodales. Suspendisse congue, arcu sit amet adipiscing scelerisque, enim neque ullamcorper dolor, sed viverra erat leo eu metus. Cras porttitor bibendum nunc.

Syndicate

May 5th 2008
Tags: Snippets, Code No Comments

shrink integers with php

function chr_enc( $id ) {        $c = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';        $id = (string)$id;        for( $i = 0; $i < strlen( $id ); $i++ ) {                $x .= $id{$i};                if( $x > 9 && $x <= ( strlen( $c ) + 9 ) ) {                        $n .= $c{$x-10};                        $x = '';                }                elseif( $x > strlen( $c ) + 10 || $x == '0' || $i == ( strlen( $id ) - 1 ) ) {                        $n .= $x;                        $x = '';                }        }        return $n;}function chr_dec( $id ) {        $c = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';        for( $i = 0; $i < strlen( $id ); $i++ ) {                $n .= ( !is_numeric( $id{$i} ) ) ? ( strpos( $c, $id{$i} ) + 10 ) : $id{$i};        }        return $n;} example: 212408898 => lo08898 30028247 => u0so7 11222207 => bmm07 94070738 => 94070738 81071369 => 81071A9 197309119 => j73091j 15018738 => f0i738 78584770 => 78WL70 191854002 => jiS002 188192516 => i8192P6 65437343 => 65H73H 124061870 => cEZ870 207003851 => k700CP 218431612 => l84vZ2 5688664 => U88664 162528033 => gps0x 57489904 => VM9904 89269087 => 89q9087 193413083 => jyd083 144121183 => eFli3 218427866 => l84r866 57912246 => V91mK 229392376 => m9392B6 56443324 => UIxo 34996219 => ...
May 5th 2008
Tags: Offtopic 8 Comments

would you pay for a weekend with me?

I’m interested to know something. If you could, would you pay $5,000, not including flight and food, to get in a hotel with me for a weekend. Basically you get on a table with me and tell me what you’re doing (you can be as specific as you want). I’ll ...
April 7th 2008
Tags: News 47 Comments

seoFM.com abused for shady and illegal blackhat methods - marcus t.’s true nature

aw, fuck it. don't have the time to deal with that shit. - so far, threads, which have surfaced in forums regarding this topic, have been deleted by the request of mr. t. himself. he's even arrogant enough to boast about having the owner of the abakus forum remove some threads over ...
March 16th 2008
Tags: Offtopic 3 Comments

great hotels

las vegas: chicago: mieming, austria:
March 9th 2008
Tags: Rediscoveries, Offtopic No Comments

bit char-g is still available

can somebody remember bit char-g? those really tiny rc cars? those little cars are a hell lot of fun and because i found a site that sells those cars for a very low price i ordered a few of them including the stuff to build a track. - gundamstoreandmore.com have fun :D

Search