Show PDF file in PHP

If you want to show your PDF file in PHP, you can put the code as follow :

———————

<?php

$pdf=’Showing.pdf’;
header(‘Content-type: application/pdf’);

header(‘Content-Disposition: attachment; filename=”‘.pdf.'”‘);

readfile($pdf);
?>

————————–

Note : The above code will open/ save PDF file as attachment. If you want to show the PDF file directly into same window, you can change the Content-disposition type into inline. So, the line

header(‘Content-Disposition: attachment; filename=”‘.pdf.'”‘);” should be change into :

header(‘Content-Disposition: inline; filename=”‘.pdf.'”‘);

——————————-

There is many option can be used for header field in PHP. For complete reference, you can follow this link : http://www.faqs.org/rfcs/rfc2183

Hope this article can be useful.


Compassionate for The Bomb’s Victim

Friday, 17th July 2009, three days before Manchester United, the champion of English prime league 2009,  comes to Jakarta Indonesia for the exhibition match with Indonesian all star team, the terrorist had put several innocent people into dead. Some other people were foreign tourist and the others were Indonesian people. What a shocking and unpredictable moment that the same suicide bombing recur at the same place which is the JW Marriott Hotel a few years ago (2003).  The second explosively bomb was happened also at Ritz Carlton Hotel which is the place that Manchester United official and player team will staying during their tour to Indoneisa for exhibition match with Indonesian All Star team. The terrible incident had made Manchester United team cancel their visit to Indonesia, even the chief of Indonesian Football Association go to the Malaysia for assuring that Indonesia will escalating close custody for the all member of team.

The most important thing that the actor behind these bomb is not human being at all. Of course, we realise that there is a motive why they are doing this aggresive action, but they had already caused the innocent people to become victims. They had took over someone life whom had been killed by the bombs. May be some of the victims were a wage earner for their family and their dead will put the family into suffering situation. I think the terrorist had lost consideration for this matter.  We can conclude that the terrorists, don’t have any affection as the human being. We know that every religion in the world teaches the followers to compassionate each other and also to love each other apart from the religion.

At the end, I just want to say that I really condolence for all the victim of this tragedy, and I hope that Indonesian Police Intelligent Agency can clamping down on the bomb terror in the future.

Learning from Michael Jackson’s Dead

Hi All,

This is the first time I write my blog in English. I know it’s not really good, but I hope it can be understood by everyone. It seems to be not long ago since the dead of Michael Jackson. Everyone who love pop music will be remembered of his influences in pop music.

The unique style of his pop music and his excellent stage performance have been influenced many pop singer. Many musical observer has commented on his great performance after his dead and they are agree to admit his contribution of pop music to be the unforgettable moment even past many years in the future.

What do we learn of Michael Jackson’s dead ? First, Michael Jackson’s dedication is a good role model for person who wants to get confession as ripsnorter. We know that musical world is not the primary thing in human’s live, but it could not understate the existence of human being. It could bring up to the improvement of someone’s live and potention.

Second thing, the creativity of Michael Jackson should be the main thing that can be followed by us. It will diversify one person to be unique, compared with the others. Unique product will be remain unforgettable thing for the rest of the world. So, a retorical question, could we be creative as Michael Jackson ? Please keep this question for yourself and don’t forget to answer it by giving your best effort on getting it.

The last but at least, we know that Michael Jackson’s dead had leave behind quite a lot of his obligation. It will be a good lesson for us, the popularity of someone sometimes could make his/her life miserable when he/she forgot to stop his/her ambition. We can learn that Michael Jackson is ambitious person that he can get everything once it passed to his mind, even though his power of money is not enough to gain. Yes, that we know the proverb of “no pain no gain”, but also don’t forget that “you can plan something, but the granting is in God”.

Hope you can enjoy my article today. Thanks.

Should We Dreaming ? Yes, We Should Keep Dreaming, But Don’t Forget About The Action !

Do you realise that our eyes and ears are not only doing for basic function like seeing and listening something ? Of course, they are absolutely vital for supporting our life, but we should also know that through these two vital organs, we could gather much information from the other successful people by learning their effort intake. We could listen to their recipes for their success and also seeing what they get when the success has reached to their life. The success story of those people may be can inspire us by dreaming that the success also can be gained by us.

By always keep dreaming of those kind of success, it will keep up our spirit on the right track and also can improve ourself to gain the higher success in the future for our carier or job. So, don’t be afraid or loose your concentration  for dreaming the success.

Keep dreaming of success everyday is good for us, but it is not right to take the pillow then sleeping for a long hour  every day in a bed. I swear that you can’t make the dream will be coming true in the future. Take action man ! Yes,  keep trying to do something you are good in it. Don’t be  give up for some fails or  mistakes happen as the result, because we can improve our experience to do the same thing by learning the mistakes or errors that happened again in the future.

Remember, there is some idiom or expression that said if we keep thinking that  we can did something, we had already gained a half or 50% of the success.

So, as the conclusion, let’s keep dreaming, keep trying, and keep up spirits.