Fork me on GitHub
Feb 28 2008

Kazak Ya Watan – كازك يا وطن

Please wait

Shoo Hal Ayam will be playing live on Radio Al Balad 92.4 with Yousef Ghishan talking sarcastic sketches about poverty corruption,…, and the raise of prices.
you can also listen to the show on
www.ammannet.net

شوهالآيام سوف تقدم عرضا على راديو البلد٩٢.٤ مع يوسف غيشان، يتخلل العرض سكيتشات ساخرة عن غلاء الأسعار والفساد. يمكن الإستماع للعرض على الموقع الآتي

www.ammannet.net

if the site didn’t work with you, you can open the direct streaming url to your audio player (http://wma.str3am.com/ammannet)

Saturday 1st, March @ 20:00 (18:00 GMT).

Enjoy.


Feb 28 2008

Good Old sscanf

Please wait

Working in PHP, all this time, and the big uses you find in regex, and all the string processing we need to, could make us forget our old friend that can easily solve a problem.
sscanf, do you remember it, well, for quite some time I didn’t, until I saw it in a random code I found online, so this post is a reminder that this function exists.
An example, if we have a date, lets say coming from a Mysql DB, (ofcourse you can use strtotime, but sometimes it has it’s limitations) and you want to get the year, month, day, hour, minutes, and seconds, and you have it in a string, you can parse it with some splits, but 1 call of sscanf can do the job.

<?php
$date = ’2007-05-18 22:15:03′;
sscanf($date,‘%d-%d-%d %d:%d:%d’,$y,$m,$d,$h,$i,$s);
var_dump($y,$m,$d,$h,$i,$s);

and thats all.


Feb 16 2008

PHP5 CAPTCHA

Please wait

I’ve written a small CAPTCHA library, in an OO style, and I love to share it with you
http://alaaibrahim.github.com/php5captcha/


Feb 2 2008

How to scare a person next to you in an airplane?

Please wait

1. Take out your laptop from the bag;
2. Open it slowly and calmly;
3. Turn it on;
4. Make sure that the moron next to you is looking at your screen;
5. Access to the internet;
6. Close your eyes and raise your head towards the sky;
7. Take a deep breath and click on this link: http://www.thecleverest.com/countdown.swf
8. Watch carefully the expression on the moron’s face!