Codeaid - codeaid.net - Codeaid.net
General Information:
Latest News:
Tracking Facebook, Twitter and Pinterest interactions 13 Nov 2012 | 03:34 am
Recently I was given a task by my current employer (an online retailer) to find a way to track social interactions of registered members on the company's website. The goal was to reward members with d...
... 8 Oct 2012 | 02:52 am
Mohammed Amine BENABDALLAH Professeur de droit public, Université Mohammed V, Agdal-Rabat - Doctorat d'Etat en Droit public, Universite de Paris II; - Diplôme des Etudes supérieures en sciences admin...
Decode contents of bencoded .torrent files 8 Jun 2012 | 11:20 pm
Recently I logged into my old and long forgotten phpclasses.org account and noticed that the BDecode class, which I wrote back in 2006, is to my surprise still getting downloads. Due to its age, the c...
Set value of an array using xpath notation 18 Oct 2011 | 02:04 am
This is a continuation to my previous article on how to get values of multi-dimensional arrays using xpath notation. This time I will show you how to set a value of an array using the same xpath nota...
Get values of multi-dimensional arrays using xpath notation 23 Aug 2011 | 10:07 am
Sometimes we have a value burried deep within a multi-dimensional array. In order to access it we usually end up doing something like this: $value = $array['a']['b']['c']; hoping that all the keys a...
Get the last effective URL from a series of redirects for the given URL 18 Aug 2011 | 09:37 am
As some of you may know websites like Facebook or Twitter allow you to fetch user profile images if you know id of the given users. For example, you can fetch the Facebook image for Mark Zuckerberg by...
Improved var_dump() with colored output 4 Jun 2011 | 05:44 am
As developers, we all do some debugging within the code that we are writing at that moment. Usually the first choice is either calling var_dump or print_r depending on what we are used to but it usual...
Generate a string of random characters 15 Dec 2010 | 05:24 am
Here's a quick function for all those occasions when you need to generate a string of random characters in javascript.
Calculate script execution time (PHP class) 10 Aug 2010 | 03:00 am
Sometimes when writing PHP code that is supposed to run fast we use the script execution calculation functions. Usually it involves (at least for me :) copying the code from example #1 on PHP's microt...
Parse INI file into a multi-dimensional array 3 Jun 2010 | 04:24 am
PHP's native parse_ini_file function allows you to process simple ini configuration files. As the documentation says "parse_ini_file() loads the ini file specified in filename, and returns the setting...