Freelancer's Playground! Learn Programming, The Freelancer's Way

29May/073

Dynamic DNS using DynDNS

One day I'm looking at my DSL modem's feature. There I see a DDNS tab, I don't know what DDNS mean until I open it. So, DDNS means Dynamic DNS. At this point I still don't know what is ddns used for. But there's a link to dyndns.org. and a form with username, password and domain in use. Still don't know what the use of it, I open dyndns website and register a free account. Looking for dynamic dns section, add a new host and add this information to my modem's setting (hostname, username, email, and password). save it and open the domain I add from browser. Waw, I'm surprised that I can access my modem's administration page from internet. Now I wonder, can I make my laptop's http service accesible internet?.

Looking around dyndns website and I found a download page. I download an update client for windows, because right now I'm using it. There's client app for linux and mac too. After download and install it, I set the same information i put into my modem's config and do an update IP. after it's done I surf my laptop using hostname I registered earlier. I can see my server's welcome page. I didn't satisfy with the result, so I contact some online friend to open the hostname from their browser and they did see the same welcome page. Hmm, so this is the use of dynamic dns. I think this is what my friend abud need.

Filed under: Tutorial 3 Comments
10May/076

Create Multiple File Upload Form Using Javascript And Php

Currently I'm working on a project that required an upload form to be dynamic. That is when I want more file to upload I don't need to upload lets say 5 at a time, because I can add more field to it. The idea is simple, I just need to manipulate DOM to add the field and modify PHP manual a little bit to match my need. Look below the full source.

Filed under: Tutorial Continue reading
7May/071

Setting Broadcom Wireless Device in Kubuntu in detail part 2

So, your wireless device is working right now. But, how do you know it's working properly? We just set it up right?. Don't worry, in this part we'll learn how to test it. First, make sure you have an access point that's working fine. Or to make thing easier, go to public hotspot on your town. Don't have in your town? Auw, that's terrible. Anyway, I'm assuming you are currently on public hotspot right now. And I also assume you are using Kubuntu (specifically [but not important] 7.04).

Filed under: Tutorial Continue reading
5May/070

Setting Broadcom Wireless Device in Kubuntu in detail part 1

Well, This actually is an alternative solution from my previous post. This time, the problem still the same. But I did using different method. Instead of using driver from installer which is came from CD included with my laptop. I'm using driver that's already installed on my laptop. Why I did this? because I don't bring the installer and I'm just reinstall my kubuntu with ubuntu 7.04 Fiesty Fest.

Filed under: Tutorial Continue reading
7Apr/070

Creating Dropdown Selector for Date Function

Sometimes, we need to create a form that need a date selection. Here's how I handle this thing. First, let us create some function to do this :

Filed under: Tutorial Continue reading
27Mar/070

Setting Broadcom Wireless Device in Kubuntu

Sudah sekitar 4 bulan saya menggunakan kubuntu dan sudah selama itu pula linux saya hanya digunakan untuk memenuhi harddisk sampai kira2 2 minggu yang lalu saat saya dapat DVD repositori dari fajran.

Filed under: Tutorial Continue reading
22Mar/072

Optimize wordpress DB

Having experience that your blog is slowing down while network connection is in normal state? Well, that could be caused by several factor. It could be caused by network slowing down on your blog server, or you're accessing your blog in the peak time. If what I stated above is not the problem, maybe you want to check your database. Because it happen every time that after a few month, we usually receive much spam. Take this blog as an example, for the past 15 days, I have received around 1670 spam.

Filed under: Tutorial Continue reading
13Feb/071

Creating animated CAPTCHA

Let's learn how to create CAPTCHA, but not just plain. We'll build an animated captcha. So, how do we create it? First we need GIFEncoder class from phpclasses.

require_once "GIFEncoder.class.php";
Filed under: Tutorial Continue reading
30Jan/070

Create Updatable Scroller Text

This tutorial came from a project of mine. At that time, someone ask me to create a scrolling text that updated when the data is modified. After look into the problem I found that this problem can be done using simple ajax and php script. This tutorial will show you how I completed this task.

Filed under: Tutorial Continue reading
26Jan/070

Creating Random Password in JAVA

Sometime, we need to create a random string for some purposes. Well, I do need this random string for a project of my friend. So, how do I create this random string? The idea is simple, I just need to create this random string from MD5 hashes that came from current time and multiply it by random integer and multiply again by some integer.

MD5 md5 = new MD5();
Date date = new Date();
long seed = date.getTime();
seed = seed * (1 + (int)(Math.random() * 5000));
md5.Update(String.valueOf(seed));
hash = md5.asHe<img src='http://bayu.freelancer.web.id/smilies/yahoo_angry.gif' alt='&#120;&#40;' class='wp-smiley' width='34' height='18' title='&#120;&#40;' />).toUpperCase();
int startIndex = 1 + (int)(Math.random() * 50);
if(((startIndex + passwordLength) - 1) &gt; hash.length()){
startIndex = hash.length() - passwordLength;
}
returnValue = hash.substring(startIndex - 1, (startIndex - 1) + passwordLength);

As For the MD5, I use a library from FastMD5. And this is my code. Well, it's a non optimized code. But, you should get the point.

Filed under: Tutorial Continue reading