<?php
function get_search_phrase($referer){
$key_start = 0;
$search_phrase = “”;
// used by google, msn, alta vista, ask jeeves, all the web, teoma, wisenut, search.com
if (strpos($referer, ‘q=’) !== false) $key_start = strpos($referer, ‘q=’) + 2;
// if present, get the search phrase from the referer
if ($key_start > 0){
if (strpos($referer, ‘&’, $key_start) !== false){
$search_phrase = substr($referer, $key_start, (strpos($referer, ‘&’, $key_start) - $key_start));
} else {
$search_phrase = substr($referer, $key_start);
}
}
$search_phrase = urldecode($search_phrase);
return $search_phrase;
} // end get_search_phrase
$keyword = get_search_phrase($_SERVER[”HTTP_REFERER”]);
?>
The usage of quotation mark in script PHP very often we meet, maybe can be every script that we make existed the usage of quotation mark referred.
Read the rest of this entry »
This function randomizes the order of the elements in an array also used together with srand() function.
shuffle() example:
$ar_value = range('A','F'); // create and fill the elements of $sar_value = array('A','B',...'F');
echo "First value:
\n”;
WHILE(list($key,$value) = each($ar_value)){
echo “Index[ {$key} ] => $value
\n”;
}
echo “
\n”;
echo “After shuffle():
\n”;
srand((float)microtime()*1000000);
shuffle($ar_value);
WHILE(list($key,$value) = each($ar_value)){
echo “Index[ {$key} ] => $value
\n”;
}
?>
And the result of the code above:
First value:
Index[ 0 ] => A
Index[ 1 ] => B
Index[ 2 ] => C
Index[ 3 ] => D
Index[ 4 ] => E
Index[ 5 ] => F
After shuffle():
Index[ 0 ] => C
Index[ 1 ] => B
Index[ 2 ] => A
Index[ 3 ] => F
Index[ 4 ] => D
Index[ 5 ] => E
Anda bisa mengatur Squid untuk menanyakan para pemakai untuk satu username dan password. Squid datang dengan satu program yang disebut ncsa_auth yang membaca NCSA-compliant apapun meng-enkripsi file password. Anda bisa menggunakan program htpasswd yang datang meng-install dengan Apache untuk menciptakan password anda. Berikut cara membuatnya:
Read the rest of this entry »
It is possible to limit HTTP Internet access to only the Squid server without having to modify the browser settings on your client PCs. This called a transparent proxy configuration. It is usually achieved by configuring a firewall between the client PCs and the Internet to redirect all HTTP (TCP port 80) traffic to the Squid server on TCP port 3128, which is the Squid server’s default TCP port.
Your first step will be to modify your squid.conf to create a transparent proxy. The procedure is different depending on your version of Squid. Read the rest of this entry »

In this tutorial it will be analized how can be controlled the playhead of a MovieClip using ActionScript play() and stop() methods. Read the rest of this entry »
This tutorial is about how to move an object using the LEFT, RIGHT, UP and DOWN heys in Adobe Flash 8. 1. Create a new Flash8 document with 400×300 dimensions. Save it as flash8keys.fla.
2. Insert a new layer. Rename layers actions and object like in the picture below: Read the rest of this entry »
Open standard merupakan parameter untuk menyamakan standard dari beberapa system peranti keras dan peranti lunak, agar dapat jalan dengan baik dan saling kompetibel satu samalainnya. Inisiatif pemanfaatan open standard dilakukan oleh banyak Negara di Eropa, karena kebanyakan penemuan-penemuan berasal dari
Penemuan yang selanjutnya dibuat open standard misalnya standard kominikasih ponsel GSM yang dibuat oleh 3rd Generation partnership project (3GPP) pada tahun 1998, slot computer PCI dan standard TCP/IP yang banyak digunakan saat ini. Yang menarik dari perkembangan open standard didunia teknologi informasi ini adalah keikutsertaan perusahaan peranti lunak raksasa kedalam kancah open standard. Dimulai dengan menyumbangkan standardnya kekomunitas sehingga dapat dimanfaatkan secara luas oleh produk yang bukan hanya dibuat oleh perusahaan yang bersangkutan. Pengakuan open standard dari “big guy” sekelas Microsoft merupakan satu kemajuan dalam dunia open source, karena konsep open standard sebetulnya mengacu pada open source, dimana kita tidak dibelenggu oleh satu vendor untuk dapat memanfaatkan suatu teknologi.
Prinsip dasar open standard adalah : Read the rest of this entry »
PHP merupakan bahasa pemrograman yang sangat cepat, namun masih banyak cara mengoptimasi PHP tidak hanya sekedar seberapa cepat eksekusi kode.
Read the rest of this entry »
Salah satu jenis pekerjaan yang dibutuhkan dalam sebuah perusahaan yang berbasis teknilogi informasi adalah Programmer, adalah sebuah software house. Bagaimana menciptakan sebuah lingkungan yang nyaman untuk bekerja bagi para programmer ini?
Kata orang, programer memiliki kebutuhan yang berbeda dalam bekerja dengan pekerja lainnya. Jika kita ambil asumsi hal ini benar maka apa kebutuhkan mereka tersebut ?