Skip to content

URL Shortener using Auto-Increment field.

Good Night,

This is a new version of URL-Shortener that don’t create random IDs to websites, it uses the auto-increment field and replace it to other base.

It was necessary to create two new methods
[code lang=”php”]
function convertDecimalTo($decimal,$newBase,$str,$letters) {
if ($decimal >= $newBase) {
$x = $decimal % $newBase;
$y = $decimal / $newBase;
$str = $letters{$x} . $str;
if ($y < $newBase) { $str = $letters{$y} . $str; } return convertDecimalTo($y,$newBase,$str,$letters); } else { if (strlen($str) == 0) { $str = $letters{$decimal} . $str; } return $str; } } function convertBaseToDecimal($value,$newBase,$letters) { $sum = 0; $len = strlen($value); $end = $len-1; for ($x=$end;$x>=0;$x–) {
$sum = $sum + strpos($letters,$value{$x}) * pow($newBase,($end – $x));
}
return $sum;
}
[/code]

You can download the full new version to PHP4
URL Shortener (LURL) using auto increment field to generate the “TAG”

Hope you enjoy,
Matheus

Chart to your URL Shortener with Statistics. PHP4

Published inAprendendoCodeMySQLphp

5,153 Comments

  1. Moving is always a hassle — had to deal with this a few months ago, and no joke, I almost lost it. You start packing, then bam — you realize how much junk you’ve got. Neighbor had a great experience with another, but I wanted to verify everything. Long story short: when you’re looking for reliable moving services around here, compare at least a few. Because, experienced crews make everything easier — especially in summer heat. I personally — called about five places — and trust me, I avoided a huge headache. So here’s the link that put everything in one place. moving companies nevada moving companies nevada Honestly, that list cut my search in half. Everything is transparent — clear breakdowns. Booked through that link and they handled it like pros. Take your time. Ask about equipment. A solid moving company turns stress into routine. Good luck with your move!

  2. RobertHeall RobertHeall

    До начала инфузионной помощи нарколог проводит осмотр, уточняет жалобы и оценивает противопоказания. При наличии показаний в программу могут быть включены инфузионные растворы, седативные средства, препараты для поддержания обменных процессов, гепатопротекторы, витаминные комплексы и другая медицинская терапия. Объем растворов в литрах, состав капельницы и продолжительность процедуры определяет врач, поскольку больший объем не означает автоматически более качественную очистку организма.
    Ознакомиться с деталями – частная наркологическая клиника в Кемерово

Leave a Reply

Your email address will not be published. Required fields are marked *