Slopjong
A geek discovering the World, Tech & Science
Latest Posts
Programming
Mac
Linux
WordPress
Hardware
Howtos
Nerd Trash
php Archive
0
reCAPTCHA and this strange Uncaught TypeError
Posted on March 5, 2013
During some refactoring and code improvements in OpenSpaceLint (a validator for a specific json schema implementation) I replaced a Javascript module by some equivalent PHP code and for whatever reason [...]
Continue Reading
0
PHP: sort an array by key case-insensitive
Posted on February 26, 2013
In some situations one wants to sort an array by key but PHP's
ksort()
function sorts case-sensitive which is not always what you want. The result of ksort is an order like
A < C < b
instead of
A < b < C
. PHP 5.4.0 has introduced the
SORT_FLAG_CASE
flag to sort case-insensitive. This article shows two simple implementations to get the same functionalityIf in PHP 5.2 or 5.3 .
Continue Reading
0
Setting Return-Path in PHP mail()
Posted on February 5, 2013
This article is about a story of how to set the Return-Path email header. The situation started with a simple php script which sends an email from a host to itself [...]
Continue Reading
21
cURL: follow locations with safe_mode enabled or open_basedir set
Posted on March 31, 2012
cURL is a tool to connect to a remote server and load data from it while schemes like HTTP, HTTPS, FTP, gopher, telnet, DICT, FILE, LDAP and more are supported [...]
Continue Reading
0
ID3 batch editing
Posted on August 30, 2010
Some of my music had no interpreter and title tags set thus I wrote a little shell script to batch edit these ID3 tags. The filenames of the songs looked [...]
Continue Reading
Next Page »