House of Xrvel

Just another WordPress weblog

Archive for the ‘PHP’ tag

Contoh Stored Procedure MySQL

with 2 comments

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 »

Written by Xrvel

February 2nd, 2010 at 11:16 pm

Posted in Indonesian, PHP, Programming

Tagged with ,

Get Today Timestamp on PHP

with 2 comments

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 :)

Written by Xrvel

January 9th, 2010 at 10:13 am

Posted in PHP, Programming

Tagged with

Download File On PHP

with one comment

To download page (or file) by PHP, you can add this header to the page.
On PHP, you can use this function

header('Content-Disposition: attachment; filename="SOMETHING.HTML"');

On other web programming, you can use other function. The basic idea is by adding this header

Content-Disposition: attachment; filename="SOMETHING.HTML"

Written by Xrvel

October 11th, 2009 at 10:35 am

Posted in Programming

Tagged with

Check Your Bandwidth Speed

with 2 comments

SpeedActually, 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 »

Written by Xrvel

January 9th, 2009 at 6:55 pm

Posted in PHP, Programming, Website

Tagged with

Upgrade Your Script Automatically

with one comment

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 »

Written by Xrvel

January 8th, 2009 at 10:27 am

Posted in Featured Articles, PHP

Tagged with ,

Animated Captcha

with 14 comments

I’ve uploaded it somewhere, but here, you can get the official animated captcha :)

Animated Captcha

Read the rest of this entry »

Written by Xrvel

December 12th, 2008 at 3:00 pm

Posted in Featured Articles, PHP

Tagged with ,

Country IP Blocking

with 13 comments

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 :D )

Read the rest of this entry »

Written by Xrvel

December 10th, 2008 at 8:37 am

Posted in PHP, Programming

Tagged with ,

Preg or Ereg ?

with 2 comments

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?

Read the rest of this entry »

Written by Xrvel

December 6th, 2008 at 11:53 pm

Posted in PHP, Programming

Tagged with

PHP Regular Expression Flags

with 3 comments

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 »

Written by Xrvel

December 1st, 2008 at 11:24 am

Posted in PHP, Programming

Tagged with

PHP Random Characters

with 2 comments

Here is a small PHP code if you want to generate random character fast. :)

Read the rest of this entry »

Written by Xrvel

November 14th, 2008 at 12:00 pm

Posted in PHP, Programming

Tagged with