Thursday, 13 September 2012

The Temporary Life Of World

No comments:
Assalamualaikom w.b.t and Greetings,


Man is placed on earth only for a very short time. There, he will be tested, trained and then passed over to the Hereafter where he will stay forever. The possessions and blessings of this world,although created similar to their originals in Heaven, actually possess many defects and weaknesses. For they are intended to make man remember the Hereafter.


However, the unbelievers are not capable of comprehending this fact, so they act as if the things of this world are their sole objectives. Yet, this is wholly deceptive, since, the entirely temporary and defective favors of the world are far away from satisfying man who is created for the beauties of eternal perfection. God describes how the world is a temporary place full of deception:

"Know that the life of this world is only play and amusement, pomp and mutual boasting among you, and rivalry in respect of wealth and children, as the likeness of vegetation after rain, thereof the growth is pleasing to the tiller; afterwards it dries up and you see it turning yellow; then it becomes straw. But in the Hereafter (there is) a severe torment, and (there is) Forgiveness from God and (His) Good Pleasure, whereas the life of this world is only a deceiving enjoyment."
The Holy Qur'an, Chapter 57, Verse 20


In another verse the goods and chattels of deception in the world are thus described:

"Fair in the eyes of men is the love of things they covet: Women and sons; Heaped-up hoards of gold and silver; horses branded (for blood and excellence); and (wealth of) cattle and well-tilled land. Such are the possessions of this world's life; but in nearness to God is the best of the goals (to return to). Say: Shall I give you glad tidings Far better than those? For the righteous are Gardens in nearness to their Lord, with rivers flowing beneath; therein is their eternal home; with companions pure (and holy); and the good pleasure of God. For in God's sight are (all) His servants."
The Holy Qur'an, Chapter 3, Verses 14-15

People consider that their 60-70 year long life on this earth will be long and a satisfying one. Yet, in a very short time death comes and all are buried in their graves. As a matter of fact, as death comes closer one realizes how short a time he has stayed in this world. On the Day of Resurrection, God will question the people.

"He will say: 'What number of years did you stay on earth?' They will reply: 'We stayed a day or part of a day: but ask those who keep account.' He will say: 'You stayed but a little - if you had only known! Did you think that We had created you in jest, and that you would never be brought back to Us?' "
The Holy Qur'an, Chapter 23, Verses 112-115
Those who forget that this world is only a temporary place for trial and who are not careful of God's signs, but are satisfied only with the worldly play and amusements of this life, assume them as their own, and even deify them will surely deserve the grevious penalty. The Qur'an describes the status of such people:

"Then, as for him who transgresses all bounds, and prefers the life of this world, then surely the hell, that is the abode." The Holy Qur'an, Chapter 79, Verses 37-39
Excepted from The Moral Values of the Qur'an by Harun Yahya

Wednesday, 12 September 2012

List Array Replacer for MPS Portal Using Curl PHP

No comments:
Assalamualaikom w.b.t and Greetings,


During upload content for my portal under MPS project, i always facing repetitive task that make me wasting time.

The scenario is i need to download all PDF files and upload it to the new server. Then i need to obtain each new PDF file's link to replace old link from content template.

The Overview is:

Template <-- consist old PDF links <--- Replace Old Links With the new one

Here my code:
<?php
set_time_limit(0);
//... some code for getting post data here

function grab($url,$cookie)
{
    $curl_connection = curl_init($url);
    curl_setopt($curl_connection, CURLOPT_CONNECTTIMEOUT, 40);
    curl_setopt($curl_connection, CURLOPT_TIMEOUT, 120);
    curl_setopt($curl_connection, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)");
    curl_setopt($curl_connection, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($curl_connection, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($curl_connection, CURLOPT_FOLLOWLOCATION, 1);
    
    curl_setopt($curl_connection, CURLOPT_HEADER, true);  
    curl_setopt($curl_connection, CURLINFO_HEADER_OUT, true);
    curl_setopt($curl_connection, CURLOPT_COOKIE,$cookie);
    
    $result = curl_exec($curl_connection);
    $info = curl_getinfo($curl_connection);
    //echo $info["request_header"];
    curl_close($curl_connection);
    
    file_put_contents('d:/list.txt',$result); 
    return $result;
}

$url ='http://xxx.xxx.xxx.xxx:2/group/control_panel/view/64951';
$cookie = 'JSESSIONID=F31547DD37DFF3F4CA84713725F670D4; LOGIN=7973636f6e74656e743140736b616c692e6e6574; REMEMBER_ME=true';

$result = grab($url,$cookie);

//how about if there are pages, get total pages
$pat = "#&cur[\d]+=([\d]+)#is";
preg_match_all($pat, $result, $match);
$pages = array_unique($match[0]);
$totpages = explode("=",end($pages));
$totpage = $totpages[1];


//lets grab
$previmgs = array();
$pages = array();
$imgs = array();
for($i=0;$i<$totpage;$i++)
{
    $page =  $url.'?'.$totpages[0].'='.($i+1);
    $pages[] = $page;
    $result = grab($page ,$cookie);
    $pat = "#http:\/\/xxx.xxx.xxx.xxx:2\/group\/control_panel\/manage\/\-\/document_library\/view\/[\d]+\/[\d]+#is";
    preg_match_all($pat, $result, $match);
    $links = array_values(array_unique($match[0]));
    $j=0;
    foreach($links as $link)
    {
        $result = grab($link ,$cookie);
        $pat = "#<input[^>]+class=\"form-text[^>]+value=\".*?(&\#x2f;documents.*?)\"#is";
        preg_match($pat, $result, $m);
        array_push($imgs,  'http://xxx.xxx.xxx.xxx:2'.html_entity_decode($m[1]));
        array_push($previmgs, $link);
        //if($j>3) break;
        //$j++;
    }
}


    $links = array_values(array_unique($previmgs));

    echo '<pre>';    
    print_r($pages);
    print_r($links);
    print_r($imgs);

    $template = file_get_contents('d:/template.txt');
    
    foreach($imgs as $img) {
        
          $template = preg_replace('~\[LINK\]~',$img,$template,1);
        
    }

    file_put_contents('d:/done.txt',$template); 
?>


Hope it help others..

Wahuallam.

CSR4 LETS XPLORE FIREFLY PARK

No comments:
Assalamualaikom w.b.t and Greetings,

Yesterday i have been informed that our CSR4 group will conducting an photography event at FireFly Park (Taman Kelip-kelip) Kampung Kuantan, Kuala Selangor where one of the state's best-kept secrets, the fireflies colonies and has a rare natural phenomena.

This event is our indoor activities for CSR as we represent YOWA by participating 2012 APFP SEApeat Photography Contest. If we won this competition all reward will contribute back to YOWA.

What is FireFly Park at Kampung Kuantan?

Entrances
Firefly Park has a beutiful phenomena where lots of firefly flying nearest to bank river. Firefly, one of the fascinating beetle that abound in Malaysia at one time and is now fast disappearing due to the fast pace of development. Fortunately, there are still fireflies to be seen in Kuala Selangor. That was a Kampung Kuantan.These tiny inserts live on berembang (senneratio caseolaris) trees that grow in the brackish waters.

Beautiful Lights
When night falls, the fireflies will feed on the nectar of the leaves and attract mates with their synchronised flashing green light. The thorax of the insect produces a green grow that flashes at a frequency of 1/3 Hz, or 3 flashes in one second. Each of the berembang tree has different groups of fireflies and each group has flashes that are synchronised. species.

Kg Kuantan Boat Jetty
We need a boat ride along the river to watch this enchanting display.



I will post more info about FireFly Park soon. Keep watch out my blog.

Wahuallam...

CSR 4 NATURE PHOTOGRAPHY CONTEST 2012

No comments:
CSR4 Indoor Activities Will Held on This Saturday..Be prepared guys.

My Life In SKALI Company

2 comments:
Assalamualaikom w.b.t and Greetings,


Since i started my work and trained under SCALE (SKALI Community Engagement) from 2 July 2012, it was a good environment here. But sometimes it has polemics issues between stuff and among Young Skalian (YS).

This is not what i am concern too much due this inner political is always happened in every company due we are in different type of department or employee hierarchy. Its human being physiology nature or habits It make sense. We are not angel and there are lot of different kind of people around us.  A bunch of these people will do a positive or negative things that will effect to us and everyone. This is how office environmental experiences and hope i will handle this better.

So do I am Happy at SKALI?

Well, not so much but not too least. We are not happy always. Sometimes we are happy and other day we were cry or frustrated. Its changing. We just try to keep it long lasting but not forever.

Thankfully to Allah because I've chosen to add more valuable experience here to learn how SKALI operate their business.

So, thanks for reading my blog. See ya..

Wahuallam...



Tuesday, 11 September 2012

Internet Business Plan Project

No comments:
Assalamualaikom w.b.t and Greetings,


As we know, all Young Skalian is under 6 month contract. We will take final exam depending what track we are. For our sake and sustainability of income we need to take an action to become internet entrepreneurship. This what came to my mind on first place when i have invited to SkALI.

There are several project that sticking in my mind since 2003. I want to be Internet Entrepreneur. But that time i was busy with university and family then the idea was ended.

On 2008, i was involved in Advertising Project handled by MiRSB company. The project called Landlord Monsun Biz. It was a bad time due the company has inner conflict and not sincerely to help our business. My mother has spent RM8000 but not we just got 0 return. Its terribly.

Internet Business Plan

Project that i have issued for:

1. Mudah Cloner

This project starting on end of 2008 due several issues came out from Monsuner (LandLord Monsunbiz partner). We was regroup to discuss how we can create our own classified portal and make it better than Mudah .my site.

The project is divided into several parts including dynamic site structure, optimized database structure, local bank payment system, sociology-community environmental platform, SEO strategic system, Viral mechanism, and others that i cant remember.

For payment system, we target to cooperate with Maybank and CIMB payment terminal but they have several terms and rules that take a lot of cost before applied.

Lastly this project was abandoned due we lost Monsuner support.

I think i will stop here due i have a training today. I will continue this subject on next post.

Wahuallam.

Monday, 10 September 2012

ITD Project Proposal

No comments:
HESK + OCS NG
Assalamualaikom w.b.t and Greetings,

Its hard time when i am came along with this project during MPS upload content under progress.

The idea of project proposal is to:

1. Build up a support ticketing system that we can manage and sort it out easily.
2. Setup a monitoring system to remotely track all Lab's Computer devices and Information system.

After receive this task, then i just goggling to find the best software to fulfill this needs.

Here my best result or recommendation to use:

1. Support Ticket System


I choose to using PHP based system. My option is by using Open Source software. The last option is to use HESK. Using SpiceWork is better but its too bloated.

2. Remote System Monitoring


I've advised to proceed to OCS Inventory NG.

Next i will try to test all this application system to make sure its work as i need.

The proposal will created.

Wahua'lam..