Latest entries
Get torrent data with PHP

To use this code you first need to include a file with the benc, bdec and hex2bin functions. You can get these functions from here: functions.phps. <?php include 'functions.php'; $torrent_data = bdec(file_get_contents('yourfile.torrent')); To get the torrent data (like the announce url, the files etc) it is enough if we decode... more »

Tags: ,
Create an array for a tag cloud in PHP

Everyone tells us how to create a tag cloud with an array.. but how to actually create the array with the data that we fetch from our database? This is how I do it. The table we are working in is “pictures” and the field with the tags is “tags“. The tags are separated with a space (for example: sunset beautiful evening). $query = mysql_query('select... more »

Tags: , , ,
CSS Pagination

I actually got the idea on Antonio’s excellent blog (Woork) and used his code in some of my sites but it didn’t work well for me, so I wrote something mine that works (I am not saying his doesn’t work, it just didn’t work for me). One of the main differences is that he calls the css via the id of the list and I do it via the class of the list.... more »

Tags: ,
Create an Alexa Widget for your site

It is actually very easy: Visit the Alexa Developer’s Corner Select the widget that you like the most and write your site url into the field Copy the code snippet they give you Paste it into your website Do you use the Alexa Widget on your site?  Read More →

How to update multiple mysql rows with PHP

Did you ever want to be able to update a dynamic number of rows in your mysql table and didn’t know how? For example: like on myspace when you edit your photo album, you have a gallery and you list one of your albums with x pictures in it. You want to be able to edit all the pics at once and then save all the changes with just one click, without the need to... more »

Tags: ,
Color meaning

Did you ever wonder what color should your website be? Depending on what the content of the site is, different colors will suit best. I give you a list of colors, their meaning and what the human brain feels when it comes in contact with them. Red Red is the color associated with energy, strength, power, determination as well as passion, desire, and love. Red brings... more »

Tags: , , ,

« Previous Entries Next Entries »