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
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” »
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):
* @author Mohd Rashidi Bin Mohd Zin ([email protected])
$text = $_GET['text'];
$callback = $_GET['callback'];
$return = 'The Oracle';
$return = 'Morpheus';
$return = 'Mr Smith';
$return = 'Who the heck?';
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” »
For Read Write Poem – Napowrimo #2.
Figuring and imagining
How should it be,
Now begins the writing,
Without certainty how will turn to be.
Anxiety in my mind,
Excitement I can find,
Pleasure in completing
What once I found was challenging.
Placing my mind in tranquility,
Releasing it from any stress,
This job is certainly for me,
As it is what I do best.
Continue reading “This Job For Me” »