PHP

String encryption in PHP

String encryption in PHP

I’ve been working on 2 PHP functions that can be used to encrypt and decrypt alphanumeric strings between web pages. This is used for e.g. Captcha codes that you can generate yourself and encrypt / decrypt with these functions.

Read more…

Alphanumeric Captcha values in PHP

Alphanumeric Captcha values in PHP

In my former post I wrote about making Captcha solutions without the need for database storage. I wrote an example exclusively based on pure numeric values. I’d like to illustrate how you could create alphanumeric Captcha values instead of numeric ones, as this might be of interest for someone who would like a more fully fledged solution.

Read more…

Your own numeric Captcha in PHP

Your own numeric Captcha in PHP

The purpose with a Captcha user control is to give the user a challenge that a computer normally can’t resolve. In most cases this means an image with random letters and numbers on it. This is rather easy to set up without any need for a database, that many use as a solution to handle the encrypted messaging that has to happen between part1 and part2 in a Captcha utility.

Read more…

Recursive file searching function in PHP

Recursive file searching function in PHP

I recently made a search function for an image gallery that had to have the capability of searching for images in a directory and its subdirectories – on any level.  This is the second time ever that I have used a recursive function, this is a good example for when a recursive function can be useful.

Read more…

View your public IP address

View your public IP address

A small helpful script for viewing your public IP address. It will try to determine your real IP address even if you are hiding behind a proxy server.

You can find it here.

Read more…

Quick reference: PHP sessions

Quick reference: PHP sessions

Just a quick reference to what’s mainly needed to initiate and properly close a PHP session. I should have written this down a long time ago, since I often go back to php.net to look it up again.

Read more…

Base64 encoded PHP files

Base64 encoded PHP files

Some PHP files that comes along with script packages may often be encoded with base64. This is not a secure way of hiding code. Read further on this page if you want to know how to decode these kind of files.

Read more…

Simple HTML 2 PDF using PHP

Simple HTML 2 PDF using PHP

The following is a nice alternative for those who need to generate dynamic PDF documents on-the-go. This class does not require any PDF extensions to be loaded in the PHP configuration.

Read more…

PHP excel export without saving a file

PHP excel export without saving a file

A simple way of exporting data to the web in excel format, you don’t have to create an excel file, you just have to define the proper headers for the browser.

Read more…

PHP SimpleXML

PHP SimpleXML

A quick article on PHP’s SimpleXML.

SimpleXML provides a simple and practical way of reading and handling XML content. SimpleXML requires PHP5.

Read more…