Putting up Ubuntu favicon.ico

After being annoyed looking at all those 404 messages when IE tries to access this website /favicon.ico, i finally decided to put one up.

For those who don’t know, favicon.ico is that small (typically 16×16) icon that appeared beside the address bar. Since my blog is mostly centered around Ubuntu, I’ve chosen to put up an Ubuntu logo.

How to put up favicon.ico

Find a nice icon in png or ico format , make sure it look nice at 16×16, upload it on your website.

Put this line on your header (between <head> tags)

<link rel="icon" type="image/x-icon" href="/favicon.ico" />

If you’re using a png image, replace type with “image/png”. I haven’t personally test this with Internet Explorer much, but I doubt Internet Explorer doesnt support other icon format than .ico.

If that’s the case, you might benefit from png2ico

You can download the ubuntu favicon.ico here.

Find more information about favicon

[tags]favicon,png,ubuntu,firefox,browsers,web[/tags]

owasp php filters – help sanitize php variables

Internet is full of spam bots, autosubmitters, malicious users and worms that can compromise the security of your website at any given time, therefore you should be suspicious of any data you receive via GET/POST variable in your system.

Among the nasty things that could happen to your system when you don’t filter your data is, SQL injection, Script Injection, Email abusing and Remote Execution the attacker could deface your website or even wipe your entire database if you’re not careful with it.

One of the way to filter your data is to use preg_match to write regex rule for the variable that would be accepted.

However I find writing preg_match sometimes can be tiring, and that’s why I use owasp php filters to simplify the work for me. It consists of one function sanitize(), that take the variable that you want to filter and an option.

The option may be any of this value PARANOID,HTML,INT,FLOAT,LDAP,SQL,SYSTEM and UTF-8 that filters the type of data accordingly. For example if you want your variable to contain only floating-point number, then you can code it like this :

< ?php

require('sanitize.inc.php');

$var=100.50;

$float = sanitize($var,FLOAT);

?>

I isn’t much, but surely it will simplify your php coding a bit more, the other option is self-explanatory save PARANOID, which means that the variable will contain only alphanumeric character after sanitize.

SQL is handy if you want to include the variable value inside an SQL statement, this will avoid the risk of the notorious SQL injection which will affect the security of your data.

you can download OWASP PHP filter here

[tags]php,security,filters,mysql,sql,sql injection,injection[/tags]

Google Blogger Beta – Now Support Categories

Yesterday Blogger Beta has been announced in the Blogger Buzz. Blogger Beta brings new improvements over the classic blogger that we used to blog with. Among the new features are :

google blogger

  • Categories!
  • Blogger account is now merged with your Google account
  • Fine-grained author control
  • Private blog
  • New templates
  • comment feed
  • updated dashboard
  • Instant publishing, no need to republish your blog

Perhaps the most long awaited feature is the Categories which makes it easier to organise your blog with it and trackbacks. But I guess considering the amount of spam that you might get I think trackback is not worth the feature for blogger.com.

Blogger Beta migration is only limited for a few accounts for now, and you can only migrate your blog to the new Blogger system??if you see the Upgrade icon in your blogger dashboard.

At the time of this writing, your blog can’t be migrated if you host it at a different host other than blogger.com and/or your blog has many contributors/authors.

You can register an account with Blogger Beta with your Google account to test drive the system first. Howeve, as admitted in Blogger website, Blogger Beta still has few unsquished bugs, so use it at your own risk.

[tags]blog,blogging,weblog,weblogging,blogger,google,trackback[/tags]

Adwords lets you choose your own timezone!

I got this message today when i logged in my adwords account. Apparently Google gives you the option of setting up your own timezone so that its statistic would correspond with your local time.

This will ease up your daily report and syncronisation since the daily statistics will not rolled back to zero anymore at 3pm!

p/s: Google only lets you choose your timezone only once, so pick carefully.

google,adwords,adsense,promotion,ppc,advertising,advertisment

Krunch – Compressing and Decompressing files on web

Krunch

Introducing Krun.ch, a web application that let you upload and compress your files on-the-fly. Krunch also offers option to email the resulting compressed files.

Not only that, but Krunch also lets you upload and uncompress zip,rar and tar gzip archives on the fly. This eliminates the need of a standalone decompression program. You won’t need unrar/rar anymore in order to uncompress rar files.

Krun.ch is relatively new and was developed by Kailash Nadh. The same guy that brought http://splogspot.com and Pingoat.com