Determine Client IP on Apache Httpd Configuration

Posted in Know-How, PHP on December 3rd, 2008 by Zaenal M. – Be the first to comment

Sometime REMOTE_ADDR not return the real client IP address value. This is true when the server was behind the firewall, or server use application like Squid, or the client accesses the server trough the proxy (like Google WebAccelerator); so the REMOTE_ADDR become the IP of the firewall server, the Squid server or proxy server. read more »

Mendapatkan IP Pengunjung pada Apache

Posted in Know-How on December 3rd, 2008 by Zaenal M. – 1 Comment

Adakalanya ketika memanggil variabel REMOTE_ADDR, IP yang didapat bukanlah IP sebenarnya dari client (pengunjung). Ini mungkin terjadi bila server menggunakan aplikasi seperti Squid, berada di belakang firewall, atau client mengakses situs kita melalui proxy (seperti Google WebAccelerator); yang membuat IP yang tersimpan pada variabel REMOTE_ADDR merupakan IP dari Squid, firewall server atau proxy server. read more »

Multilingual Javascript Date-Format Class

Posted in Javascript on December 1st, 2008 by Zaenal M. – 4 Comments
PHP strftime and Javascript DateFormat class

PHP strftime and Javascript DateFormat class

For PHP developer, it’s will be nice if we can use same date format parameter both in PHP and Javascript. This DateFormat class created for that purpose, since took strftime like parameter to format the output string. For example passing parameter “%d-%m-%Y” will output “dd-mm-yyyy” date string. See also: PHP strftime manual.

DateFormat has standard version and prototype version. The standard version does not required any other library, because it’s developed under standard Javascript. The prototype version required Prototype library (at least version 1.6). read more »

Hopp bukan Abramovich

Posted in Gado-Gado on November 25th, 2008 by Zaenal M. – Be the first to comment

Buat pecinta bola sekalipun, Hoffenheim adalah nama yang asing. Berbeda misalkan kalau kita menyebut nama Real Madrid, Manchester United atau AC Milan. Bahkan kalau disebut 10-20 tahun yang lalu, orang Jerman sekalipun tidak akan mengenal klub sepakbola bernama TSG Hoffenheim.

Hoffenheim adalah sebuah kota kecil dekat Heidelberg, yang berpenduduk sekitar 3000 jiwa. Sekitar 20 tahun lalu, klub sepakbolanya berada di Divisi 9, namun di tahun 2008 ini sudah berada di Divisi 1 atau Bundesliga. Itu artinya hampir setiap dua tahun, Hoffenheim mendapatkan promosi ke divisi yang lebih tinggi. read more »

PHP Locale for Indonesia Language

Posted in PHP on November 22nd, 2008 by Zaenal M. – Be the first to comment

To format a local time/date according to locale settings, like month and weekday names and other language dependent strings, we can use strftime() function respect the current locale set with setlocale(). read more »

Compressed prototype.js & scriptaculous.js

Posted in Javascript on November 22nd, 2008 by Zaenal M. – 3 Comments

I compressed both  prototype.js version 1.6.0.2 1.6.1 and scriptaculous.js version 1.8.1 1.8.3 using Javascript Packer by Dean Edward (http://dean.edwards.name/packer/) in one file, and the result is about 95kb. read more »

Photo wars: Bisnis 2 Milyar Dolar

Posted in Gado-Gado on November 8th, 2008 by Zaenal M. – Be the first to comment
Giant Stock vs Microstoct Agencies

Giant Stock vs Microstoct Agencies

“The giants of the stock photo business–Getty Images and Corbis–are being challenged by a flock of tiny ‘microstock’ agencies, like Shutterstock, Fotolia, Dreamstime and iStockphoto — the last one has been took over by Getty Images. And it’s become a game that almost anyone can play”, demikian dilaporkan Business 2.0 Magazine – CNN pada tahun 2007.

CNN juga melaporkan bahwa bisnis foto di internet memutar uang sekitar 2 billion US dollar. Meski jauh dibawah raksasa-raksasa internet, seperti eBay atau Amazon, namun bisnis ini membuka peluang baru bagi para fotografer amatir untuk bersaing di belantara internet.

That’s right, ini bisnis model baru. Sebelumnya tidak dikenal yang namanya microstock agency, yang ada adalah para raksasa seperti Getty Images, yang foto-fotonya kerap menghiasi wajah koran nasional kita. Tapi sejak adanya bisnis foto gaya baru ini, Getty Images maupun Corbis tampaknya harus rela berbagi keuntungan. Dan tidak ada salahnya bila para hobiis foto (photografer) di Indonesia ikut meramaikannya. Sambil menyalurkan hobi, siapa tahu mendapatkan keuntungan—yang tentunya jauh lebih sehat ketimbang sekedar membuat blog penuh iklan. read more »

jEdit: Programming Editor

Posted in Know-How on October 16th, 2008 by Zaenal M. – 4 Comments
Accessing SVN Repository Directly from jEdit

Accessing SVN Repository Directly from jEdit

jEdit merupakan text editor yang dibuat dalam bahasa pemrograman Java, dan dirilis secara gratis dengan lisensi open source. jEdit mendukung hampir semua bahasa pemrograman, termasuk berbagai bahasa yang berkaitan dengan web-development yakni HTML, CSS dan Javascript serta PHP dan MySQL. Khusus untuk PHP, jEdit mendukung syntax highlighting, validasi sintaksis, code navigation, auto-complete tag/code dan juga PHP-parser.

Ketika pertama kali menginstall, banyak orang menyangka bahwa jEdit adalah ‘just another ordinary text editor’. Berbeda misalkan bila mencoba Eclipse-PDT (http://www.eclipse.org/pdt/); dengan source lebih dari 100Mb, Eclipse-PDT nampak powerfull ketika pertama kali mencobanya. Akan halnya jEdit, dengan source instalasi tidak lebih dari 3Mb, nampak terlalu sederhana. Namun justru disitulah letak keistimewaan jEdit. read more »

Donald Knuth, TeX/LaTeX dan Metafont

Posted in Know-How on October 16th, 2008 by Zaenal M. – Be the first to comment

Mungkin hanya sedikit orang mengenal matematikawan bernama Donald Ervin Knuth (lahir 10 Januari 1938). Singkat cerita, Donald Knuth termasuk salah seorang yang memiliki jasa besar atas kemajuan dunia komputer dewasa ini, diantaranya adalah merumuskan typeface (font) komputer modern yang digunakan sekarang. Karya masterpiece Donald Knuth, “The Art of Computer Programming” yang terdiri dari 5 volume, merupakan ‘kitab babon’ di dunia komputer. read more »

Rumahku Indonesia-ku

Posted in Gado-Gado on October 16th, 2008 by Zaenal M. – Be the first to comment