Currently Browsing

Programming

1. Use a redirect function in PHP without header/location stuff: Now use: in order to redirect to index.php after 3 seconds. 2. Generate 3 characters salt strings: Change $i < 3 with more characters, as suited to your needs. 3. Clean up user input:

First of all you need the Simplepie library. You only need the simplepie.inc file included in the archive. My example extracts 5 items from a recipe blog: I have also included a substr() function to show only the first 23 characters in the title. It fitted my web site better. Don’t forget to have the simplepie library included at the...

I’m talking here about extracting latest posts to a different site. I’m also assuming that the databases are on the same server. So here is the script: The last line of the script reopens the previous connection, if any. If you don’t use any MySQL databases on your main site, then remove the last database selection line. You should take...

It took me a while to try and rephrase the title, but to no avail. Using the image.php script from my last article, I will read database entries and replace all tags with clickable thumbnails. All you need to do is have a database entry with an tag. Read the database (I’m sure you know how to do this): Extract...

Ever since I discovered PHP I tried to simplify everything by splitting files into most used parts and using include() to add them, reading files from directories and generating galleries on the fly, or by using many tricks to make my developer life easier. Today, I’ll show you how to use PHP and GD library to show perfectly cropped thumbnails...