Archive for the ‘PHP’ Category
Contoh Stored Procedure MySQL
Apakah itu stored procedure MySQL? Secara singkat saja, stored procedure adalah sebuah function yang tersimpan di MySQL. Seperti layaknya sebuah function pada bahasa pemrograman lain, sebuah function bisa terdiri dari lebih dari satu baris, bermacam-macam operasi di dalamnya, mengandung variabel, dan lain-lain.
Read the rest of this entry »
Get Today Timestamp on PHP
To get today timestamp on PHP (for example now is 2 Januari 2009, 13:32), you want to get timestamp of 2 Januari 2009, 13:32, you can get it by this PHP code
<?php $time = strtotime('Today'); ?>
Very simple with strtotime
Login to Remote URL with PHP Curl
If you want to fetch page from remote URL or you want to perform form submission to a remote URL, here is a solution for you. You should use PHP curl.
Read the rest of this entry »
How to Delete or Disable WordPress Post Revisions
Since WordPress version 2.6, everytime you edit your existing posts, a revision will be recorded to your database. Of course this eats your database space.
In most case, we do not need this feature. We have to save some space.
Read the rest of this entry »
Check Your Bandwidth Speed
Actually, i use the resource from SpeedTest.net, but you can check your bandwidth speed width the mini version here. Your browser must support flash and has javascript enabled.
Read the rest of this entry »
Upgrade Your Script Automatically
Usually, most of your online script have to be updated regularly such as your online WordPress installation or other installation.

Usually, we download the script from the script download site to our local computer, and we upload it to our server.
Sometimes, it’s frustrating because the file is relatively big and we have to upload it from our local computer to our local server manually.
Now we don’t need to download it to our local computer and upload it manually.
Read the rest of this entry »
Animated Captcha
I’ve uploaded it somewhere, but here, you can get the official animated captcha

Country IP Blocking
If you run a proxy, you may want to block visitors that are from some countries, based from their IP address. And i will tell you how to do this with a little bit of PHP programming (just a simple one, believe me
)
Preg or Ereg ?
For PHP programmers, if you want to work with regular expression, you have two choices. You can use “preg” (preg_match, preg_match_all, preg_replace, etc), or “ereg” (ereg, eregi, ereg_replace, etc).
Which one should you use?
PHP Regular Expression Flags
Here is a case. You have “abc[def]xxx[123a]zzz”.
You want to remove everything inside the square brackets [ ].
What regular expression you should use?
Read the rest of this entry »