# Setting up for local development of a website

A very popular choice when setting up an Internet development environment is the LAMP stack. LAMP stands for Linux, Apache, MySQL and PHP. Combining these four software packages makes for a solid and completely open-source base to develop websites and Internet applications on your own computer before publishing them online. Step 0: Linux I am

# URL rewriting con mod_rewrite

Spesso e volentieri, sul web, si incontrano degli indirizzi URL “brutti”: http://weblog.seanbone.ch/read.php?id=42 Questi indirizzi non hanno nessun significato per un utente, sono pieni di numeri, punti di domanda ed altri strani segni  – difficili da memorizzare o da ripetere ad un amico. E non bisogna nemmeno dimenticare il Search Engine, per cui l’URL è molto

# Creating a basic log-in system

While building a website network like that of ZumGuy, there are certain elements and applications one will find oneself creating over and over. One of these is a simple PHP-based login system, and to save myself some time I have come up with a modular file I can simply copy-paste wherever it is needed. What

# PHP: generare una stringa casuale

Si tratta di un’applicazione semplice ed estremamente utile per una varietà di applicazioni.Definiamo la funzione str_rand, che si basa su mt_rand di PHP, per generare la stringa: function str_rand($len = 32,$chars=’0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ’) { $str = ”; for ($i = 0; $i <$len; $i++) {$str .= $chars[mt_rand(0, strlen($chars) – 1)]; } return \$str; }

# Creating a secure contact form

One common application in web development is creating a contact form. The basic concept is very simple: you display a form, the user submits it and you send the submitted input to your self. There is, however, and inherent danger in this form: spammer bots may use it to send spam not only to you,

# PHP: creating an automatic and dynamic banner

In this article I will illustrate a relatively simple PHP application, but which contains a couple of useful techniques: creating an automatic and dynamic banner. To keep it simple, it will simply be a series of images, but these techniques could really be used for anything at all. Nonetheless, it will include a couple of

# Automatically replacing a URL with a link

Automatically replacing a URL with a link. This may be required when a form is submitted and an internet address (URL) is not automatically a hyperlink. The solution is to make use of a technique called ‘regular expressions’. Using a regular expression we can identify any URLs in the submitted content. We can then replace