I'll Give You Hell

Who I really am?
Could I be that adoring champ,
Or the tiny tinker bell,
That place you under a happy spell.

Maybe another character you see in me,
I’m perhaps, that blue genie,
Who will make your dreams come true,
And escape once 3 wishes has being given to you.

I believe you have mistaken me,
With some other Rashidi,
I am the cruel, heartless lad,
Who sees others misery as another gag,
Who never give a damn about you,
What’s more about things you are going through.

Save your breath and stop talking,
Nowhere, is the place, to you, I’ll bring,
Adding another pain into your soul,
Which was my original goal.

I am your nemesis disguising as a friend,
Look at me properly and
You should be able to tell,
Instead of heaven, I’ll be giving you hell.

Continue reading “I'll Give You Hell” »

Lead Me

Lead me not into temptations,
I can find the way myself
,
Guide me to where truth is mentioned,
While lies falls to the ear of the deaf.

Lead me into the world
of perfection,
On faces of every boy and girl,
Present no disappointment.

Lead me into glory,
Which reached through honesty,
Not abiding the devil’s game,
For that will bring me shame.

You always see my doings,
And You are always listening,
I’m begging to you Lord Almighty,
Please lead me.

*Italic lines were quoted from Rita Mae Brown

Continue reading “Lead Me” »

[PHP 5 + jQuery]: JSON Cross Domain

Here I will share how we can get data from another domain. Normally this will return an error as it’s involving cross domain, requested by one domain to another domain. This tutorial will be using PHP 5 along with jQuery.

First, let’s look at the source of the PHP file, (file name: process.php):

<?php
/*
 * @author Mohd Rashidi Bin Mohd Zin ([email protected])
 */

$text = $_GET['text'];
$callback = $_GET['callback'];

if (!empty($text))
{
    switch($text)
    {
        case 'Google':
            $return = 'The Oracle';
            break;

        case 'Yahoo!':
            $return = 'Morpheus';
            break;

        case 'MSN':
            $return = 'Mr Smith';
            break;

        default:
            $return = 'Who the heck?';
            break;
    }

    echo $callback.'('.json_encode(array("result" => $return)).')';
}
?>

This is the file which will store on a different domain. As you can see, the file accepts two inputs; user’s input and name of the callback function. It is important to mention name of the callback function, otherwise Firefox will return an error “invalid label”, while other browser will not display anything.

In the end, the file will return a string consists of name of the callback function and the encoded JSON.

Continue reading “[PHP 5 + jQuery]: JSON Cross Domain” »