Category: PHP

PHP Programming stuffs.

  • Quick Adsense Random Align

    Quick Adsense is one of useful WordPress Plugin which can be downloaded here
    http://wordpress.org/extend/plugins/quick-adsense/

    It can insert ads to your post content automatically.
    Here is a hack to make your ads to be aligned randomly left / right AND center / none :
    (more…)

  • Enabling CodeIgniter $_GET

    Here is how to enable CodeIgniter support to $_GET and still able to use the normal “SEO-friendly” URL working together.
    So you will get a URL like this

    http://www.example.com/index.php/the_controller/the_function/?some=thing&more=yes

    First approach is modify your “config.php” and change this line.

    $config['enable_query_strings'] = true;

    But this is not recommended because on pagination, you will get ugly URL.
    (more…)

  • Multilanguage Programming with UTF-8 Encoding

    Multilanguage non-ASCII site? Sometimes we need to make website that can handle languages which contains non-ASCII characters, for example chinese, russian, french, germany, etc.
    To handle this, we need to handle the language on 3 parts : on PHP itself, HTML, and on the database (i use MySQL as example here).
    Basically, we need to adjust the charset (character set) into UTF-8.
    (more…)

  • WordPress Login ReCAPTCHA Plugin

    This WordPress plugin will add reCAPTCHA to login page. Why use reCAPTCHA instead of other CAPTCHA? Because reCAPTCHA is a powerful CAPTCHA.

    (more…)

  • Panduan PHP dari Newbie – 1

    Biasakan menulis kode PHP anda dalam kondisi :

    1. register globals : OFF. Kebanyakan web hosting mematikan setting register globals.
    2. short open tag : OFF. Idem.

    Gunakan require, daripada include.
    Gunakan require_once (/ include_once) hanya bila diperlukan.

    Untuk konstanta (/ sesuatu yang bersifat global), gunakan perintah define daripada variabel biasa.

    Percayalah, dengan mematuhi syarat di atas, koding akan terasa menyenangkan 😉