Problem in Moodle 1.9 and PHP 5.3

Today someone ask me to check his Moodle installation in his website. He used to add resource(s) easily in any course he made and lately he’s unable to add any resource. In the resource page, Moodle just displays blank page. No error message at all. After googling around, I found that the problem is (likely) […]

Auto Retweet Bot for Twitter

This simple tutorial will show you how to create a simple (ro)bot that will re-tweet (RT) any particular tweets related to your search results in Twitter. In this example, my bot will re-tweet any tweet that contain “wahihi” word, so I name it Kingdom of Wahihi. Before we start, we need following requirements: Twitter accountYes, […]

Insert French Characters Into MySQL

I was developing a bi-lingual website, so my custom CMS should be able to accept and display both English and non English characters. For English characters, it’s a piece of cake. But for French characters, I have pulling my hair for days to find out what went wrong with my script. I have set the […]

Menampilkan random foto dari Flickr

Baru saja saya menulis script kecil untuk mengambil gambar secara acak dari account Flickr saya. Script ini membutuhkan CURL dan tidak membutuhkan library XML apapun karena RSS feed dari Flickr saya perlakukan seperti file teks biasa. Saya memanfaatkan fungsi yang pernah saya tulis sebelumnya, yaitu fungsi untuk mengambil konten suatu URL ke dalam suatu variabel:[code][/code] […]

Download Youtube with PHP and CURL

This is an update for my previous Youtube Downloader. If you don’t know what is PHP Youtube Downloader, it is a simple PHP script that we can use to download video from You must, at least, having PHP installed and CURL activated. Download the source at here and read some information at Google Code […]

Youtube downloader is working!

For more than a month my youtube downloader script was not working due to youtube changed their layout. Today I’ve rewritten the script and simplified the functionality. Now is running again and ready to help everyone download videos from Youtube. Previous script consist of four functions and I’ve shortened into two functions. Please hit […]

Penyederhanaan PHP Youtube downloader

Setelah lama tidak bisa berfungsi, akhirnya youtube downloader saya bisa digunakan lagi. Secara teknis ada penyederhanaan script yang saya gunakan. Sekarang tidak perlu pusing seandainya layout halaman berubah-ubah. Berikut ini penyederhanaannya:[code][/code] Have phun!

PHP code highlight

This script will highlight string inside [code] and [/code] only. < ?php // function to call function highlight_code($txt){ $hasil = preg_replace_callback('{[code]((.|n)+?)[/code]}i',"replace_code", $txt); return $hasil; } // main function function replace_code($ketemu){ $hasil = trim($ketemu[1], "n "); return highlight_string($hasil, true); } // sample of usage: $string = "It's PHP info: [ code ] [ /code ]"; echo […]