php may be you don't know yet

Let us do something more useful now. We are going to check what sort of browser the visitor is using. For that, we check the user agent string the browser sends as part of the HTTP request. This information is stored in a variable. Variables always start with a dollar-sign in PHP. The variable we are interested in right now is $_SERVER['HTTP_USER_AGENT'].

Let us do something more useful now. We are going to check what sort of browser the visitor is using. For that, we check the user agent string the browser sends as part of the HTTP request. This information is stored in a variable. Variables always start with a dollar-sign in PHP. The variable we are interested in right now is $_SERVER['HTTP_USER_AGENT'].
Note: $_SERVER is a special reserved PHP variable that contains all web server information. It is known as a superglobal. See the related manual page on superglobals for more information. These special variables were introduced in PHP » 4.1.0. Before this time, we used the older $HTTP_*_VARS arrays instead, such as $HTTP_SERVER_VARS. Although deprecated, these older variables still exist. (See also the note on old code.)
To display this variable, you can simply do:
Example #1 Printing a variable (Array element)
<?phpecho $_SERVER['HTTP_USER_AGENT'];?>
A sample output of this script may be:

Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
There are many types of variables available in PHP. In the above example we printed an Array element. Arrays can be very useful.
$_SERVER is just one variable that PHP automatically makes available to you. A list can be seen in the Reserved Variables section of the manual or you can get a complete list of them by looking at the output of the phpinfo() function used in the example in the previous section.
You can put multiple PHP statements inside a PHP tag and create little blocks of code that do more than just a single echo. For example, if you want to check for Internet Explorer you can do this:
Example #2 Example using control structures and functions
<?phpif (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== FALSE) {
    echo 
'You are using Internet Explorer.<br />';
}
?>
A sample output of this script may be:
You are using Internet Explorer.<br />
Here we introduce a couple of new concepts. We have an if statement. If you are familiar with the basic syntax used by the C language, this should look logical to you. Otherwise, you should probably pick up an introductory PHP book and read the first couple of chapters, or read the Language Reference part of the manual.
The second concept we introduced was the strpos() function call. strpos() is a function built into PHP which searches a string for another string. In this case we are looking for 'MSIE' (so-called needle) inside $_SERVER['HTTP_USER_AGENT'] (so-called haystack). If the needle is found inside the haystack, the function returns the position of the needle relative to the start of the haystack. Otherwise, it returns FALSE. If it does not return FALSE, the if expression evaluates to TRUE and the code within its {braces} is executed. Otherwise, the code is not run. Feel free to create similar examples, with if, else, and other functions such as strtoupper() and strlen(). Each related manual page contains examples too. If you are unsure how to use functions, you will want to read both the manual page on how to read a function definition and the section about PHP functions.
We can take this a step further and show how you can jump in and out of PHP mode even in the middle of a PHP block:
Example #3 Mixing both HTML and PHP modes
<?phpif (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== FALSE) {?><h3>strpos() must have returned non-false</h3>
<p>You are using Internet Explorer</p>
<?php} else {?><h3>strpos() must have returned false</h3>
<p>You are not using Internet Explorer</p>
<?php}?>
A sample output of this script may be:
<h3>strpos() must have returned non-false</h3>
<p>You are using Internet Explorer</p>
Instead of using a PHP echo statement to output something, we jumped out of PHP mode and just sent straight HTML. The important and powerful point to note here is that the logical flow of the script remains intact. Only one of the HTML blocks will end up getting sent to the viewer depending on the result of strpos(). In other words, it depends on whether the string MSIE was found or not.

Read More..

POMOSDA,, their travel in magazine wall contest 2008

Spectacular ideas continue to emerge from participants Honda mading War 2. Mading they show the jury made the team who did a road to school shaking his head. Like the previous day, yesterday's ideas still dominate the global warming. However, there is also the theme of education and future technologies.

The theme of the environment carried by the Papar district of East High School, SMAN Kertosono Nganjuk, SMA Muhammadiyah Kertosono, and junior Pomosda Nganjuk. While mading represented by the high school education-themed Pomosda Nganjuk, MTs Ulul Albab Nganjuk, and MTsN Cape Farmers Nganjuk. One school, junior high school 1 Prambon, futurustik with the background theme of astronomy.

In high school Pomosda, there is a giant replica of the four books that are stacked like a house. "If the role of education pursued in all aspects of life, ranging from the morality of the nation till the present environmental degradation," explained Yocta, mading Pomosda crew.

It is also appointed by the junior Ulul Albab and MTsN Cape Tani. Mading both were two-dimensional shape with simple appearance. This is their first appearance in the race mading school. Ahya Nevertheless, students of class VIII MTsN Cape Farmer admitted to not be afraid to compete with other participants.

Presented the students a unique appearance SMPN1 mading Prambon with futuristic themed. Mading unique because in addition they also display dozens of Honda motorcycles from year to year around mading, plus his umbrella girl. Meanwhile, mading triangle with the ornament on top of the solar system visible light with metallic colors. "This is a manifestation of our desire to continue to move towards a better future," said Dewi, seventh-grader who also became a journalist school.

Familiar themes: environment and global warming brought SMA 1 and SMA Muhammadiyah Kertosono Kertosono. SMAN 1 Kertosono showing the castle of the former mineral water bottles. His article was about the waste and the environment. While SMA Muhammadiyah comes with its green shaped home city. "We hope to pass the final even though the first time to come," said Endra, eleventh grade students who presented madingnya yesterday.

The theme of junior high school of Pomosda is water. With descriptions of three bare tree trunks. Complete with bird nests and dry twigs.

Meanwhile, SMAN 1 Papar combine education and the environment. Ornament-shaped desk with a globe covered with cigarette butts. "This is a symbol that cigarette smoke contributed to the increased heat of the earth," reasons Linda siswai class XI. They also made observations related to the pollution of water in rivers.

While giving thumbs-up, the jury also gave critiques and input. "Primarily mading is the writing, while the display serves to attract readers to come and read the writing in mading," he said Jauhar Yohanis, the jury Honda mading War 2.

Today, teams of judges will tour visiting eight schools in the town of Kediri. Namely, Junior High School, Junior Ar Risala, SMA Ar Risala, SMA 4 Kediri, Daha Pawiyatan SMA, SMK TI Pelita Nusantara, SMK Al-Huda.

Read More..

sma pomosda, 2nd champions of school newspaper design contest 2008

In series 2 School Contest, you could say the school newspaper design contest is the most minimal participant. In total only 20 design participated. Both the junior and senior high school. this Minimal participant does not mean quality is also minimal. Design school newspaper this year even more varied and good in quality. Its news and contents or weighted.

Eleven finalists managed to escape. Newspaper design they exhibited during the Final Party (26-27/07) ago. Display with actual size, the paper praised the finalists deserved. Especially the third property winners.

Rony Setiyawan, the first winner of this contest smiled when desainya practically good. Student class XII IPA 4 was admitted for the first time following the design competition. Therefore, can be a champion for him is a surprise. Although small, Rony has a lot of expertise. Evidently, not only designs the paper. Rony also become a crew leader mading school. And managed to obtain the Best Performance by mading shaped pagoda.

This 17-year-old student was fond of drawing and designing. At first he knew of design in a computer program from the brothers, graduates of visual communication design. Then he began to study myself more deeply. Armed with experience designing and building a school Newspaper. He was finally brave show of skill when the contest began. Name of school newspapers is Metafo (Media News and Information). Green, Rony design is attracting attention.

Themed environment and global warming effects. Its main points are the subject of coral reefs. "Just happened to have lots of pictures of coral reefs, as well as concerns about the condition of coral reefs in Indonesia," he explained when asked why picked the theme. The photos she took at the coral reef of white sand area of Psychology last year. Not only that, he also talks about the forest area of lung Willis as the city of Kediri. "We can not stop global warming, we can do is slow down the process," he asserted. Therefore, Rony wish people would realize the effects of global warming. Also do something meaningful after reading the article in the paper.

Similarly, desired by Edward Surya Wijaya. The third winner of this contest, representing the SMAK St. Augustine. The contents of the papers about various things about FC so close and real. Edward did not play in making paper. Starting from doing reportage by Vice Mayor Bambang Edianto, Kyai Badrus, until the former Kapolresta Jayan Kediri I Putu Danu.

"I did the interview itself into a resource home," explained the students of class XII IPA 1 this. Eldest of two brothers this has indeed been used to cover the event. Because he was also incorporated in the school magazine.

This year is the second time Edward followed a similar contest. Last year he also became the second winner. Become the third champion this year, do not let her down. Only one thing could make it down is when the final. "I just knew there was something missing in my designs on display fitting, no dates in my newspaper," he regret it. In fact, before being submitted to the committee, Edward has been repeatedly examined. Even assisted by his colleagues.

School newspaper named Quelle. Derived from the Greek word meaning a standard or benchmark that that's for sure. "So, this reflects the content of school newspapers, that is certainly true beritanta not imaginary," continued the student who liked this design and photography. Would you like to participate again next year. Edward replied, smiling. "Nggaklah, next year would have trouble ngurus college, let another class aja brother," explained Edward who wanted to lecture in civil engineering. Edward is currently serving as Chairman of Student Council hopes next year the school could be better. "It could go all the contests and win," he argued.
Meanwhile, the second champion of the high school achieved Teguh Kurniawan Pomosda Nganjuk. Firmly seated in class XII IPA 1 displays everything about school. Starting from school activities, educational systems, and other trinkets. If Rony and Edward wrote his own article in his newspaper design. Not so with Teguh. He requested the help of his friends to contribute articles.

"Not too could write, I design it," said the student who was designing this hobby. He claimed to learn drawing and design from the older class. Also assisted with supervising teachers. When creating designs for the contest yesterday, Teguh'm not bothered by difficulty. "In addition to writing, there are technical issues such as formatting text and photos," she recalled. Fortunately, there is a tutor who can be consulted.

Another exciting experience is this contest is also the first race he attended. The first time you join and become a champion, Teguh also feel proud. "Yes, never thought, delighted," pongahnya. Participate again next year? Teguh also could not be firmly answered. Because, he must concentrate on final exams and college preparation.

Read More..

pomosda and jurnalist school trip 2009

Hearing Makodim name, many people would think as a grim place. Synonymous with weapons and war. Therefore, people often think twice if they want to go into this military region. If no urgent business, the community most likely choose dissuade the military into the area.

But, if entered into Makodim 0809 Kediri, such consideration could be thrown away. This Military headquarters that located at Jalan Ahmad Yani Kediri, is far from sinister impression. Conversely, the headquarters which covering four hectares area, looks beautiful and comfortable. Although hundreds of military looks and guard heading in and out, not felt awesomeness as previously imagined.

This condition occurs because makodim is very beautiful. There are hundreds of different flowers in each corner of the complex. Starting from Palm Bottle until Wave of Love. Plants are arranged neatly in the park. In fact, every inch of ground in this place there are no empty spaces. Everything is used for crops.

If during the day, the military environment is far from hot air. Number of large trees there to make people could comfortably take shelter. While the flowers are short, will make a fresh eye.

Although overgrown with thousands of plants but the cleanliness is maintained. Hardly any leaves or twigs that had fallen. Every morning and afternoon, members of the Armed Forces based in this place is always clean.

'Reign' of ornamental plants and flowers not only in the yard or inch of existing vacant land. But also 'looting' till indoors. Included in the Non Commander Kodim (Dandim) Totok Arm Lieutenant Colonel Imam Santoso. Do not be surprised if the entrance to the room atmosphere that is reflected Totok is beauty.

"These flowers we get by buying in Kediri," said Totok.

Interestingly, despite a wide range of existing plants, all harvested from Kediri. Nothing is purchased from outside the city. Places like Ngadiluwih florists in Kediri regency became one of the Kodim 0809 earn interest.

Plants that are purchased are also not expensive. When purchased, the plants are still small. The price is only tens of thousands of rupiah. "Palm is only USD 70 thousand (without pots, Red)," explained Totok.

Interestingly, in addition to the flowers in the nursery, there was makodim Duren. Durian trees are still small number in the hundreds lined up on the north side of the room Totok.

Nursing flowers and plants delivered to all members of the District Military Command 0809. Begin fertilizing watering until the members themselves are handled.

Only, technically different watering. Adjusted for sex. Plants that do not require much water is only watered every other day. While that may one day need water twice. Morning and afternoon.

Care costs were not expensive. Although reluctant to mention, but Totok said maintenance costs are still able to be borne by the district military command. "Most just buy fertilizer," he said.

However, often reaching into koceknya Totok own to meet the needs Makodim flowers and plants in 0809. He hoped the flowers can flourish and multiply.

In addition to developing interest in the land, Kodim 0809 also uses hundreds of pots of various sizes. Pots containing flowers dijajar neat. Make it unsightly eye.

Besides the cultivation of various flowers, Totok also interested in dragon fruit plants. Therefore, it is also planted in the park Makodim dragon fruit. "I want to know if the dragon fruit will be fruitful or not," he said, pointing to the direction of the Dragon fruit trees.

With so many flowers and neatly trimmed gardens in Makodim it, TNI headquarters Totok hope it becomes beautiful and comfortable. So that residents and visitors who were there could be comfortable and breathe fresh air. Air pollution can be reduced.

Beautiful and comfortable conditions that made 0809 Makodim frequented by various circles. Ranging from kindergarten students / elementary to high schools often hold events there. Activities undertaken as outbound.

Including 27 participants communal Journalist Radar Kediri School Trip (SJT), the incoming Class Two also took time to visit there January 20, 2009. Twenty-seven participants were also able to feel the fresh garden Makodim. "Makodim 0809 turned out to be clean and beautiful," said Ahmad Zainul Abidin, Pomosda VIII class student who became one of the participants SJT.

Read More..

pomosda and school journalist 2009

Things continue to find new and exciting school journalists who became members of communism Radar Kediri Journalist School Trip (SJT) 2009. Yesterday for example, they are not only a chance to interview the cellular business, but also had time to practice as a customer service officer (CSO) at the XL Center on Jalan Kediri Joyoboyo.

This STJ Participants is not only a practicing CSO course. By the XL, for the willing to do that given the benefits package attractive. So, do not be surprised if school journalists from different regions in the territory of ex-Kediri residency were all fighting this act. Among the conduct that is Dahlia Nurlaila, eleventh grader Pomosda Nganjuk SMA. "Last try to be customer service, not too understand but he did bother to serve our customers easier," said the veiled female students of this.

Meanwhile, the arrival of school journalists directly connected to the XL Center branch manager Oki Kurniawan Kediri. With the assistance of several staff, Oki presenting materials about mobile in general, and specifically about the XL. After that, participants are welcome SJT around the office. Conduct several interviews with the staff and employees.

For the participants, the trip yesterday to make them understand the workings and subtleties of cellular operators. "It's fun, so know about the work of marketing, tips facing competition from mobile operators," explained Mega Dwi Cahyaningsih, female students of class XI Science V SMA 2 Pare. Mega is also a vice pimred school magazine was also admitted to getting a lot of science in a day.

Meanwhile, Zulhilmi, class XI student of SMAN 1 Ngronggot Nganjuk, other participants, admitted happy to meet with many friends at the event this time. Interviewing experience became a new experience for him. "Fun is also a journalist, could be interviews with various parties," he said, smiling.

Read More..

POMOSDA, big 10 favorite teacher in radar kediri 2008

His body was huge. But his tone calm and serene. Very fatherly. Perhaps, those factors that make him favorite by his students at SMAN 1 Kertosono. Being nominated for election to be held Teachers Favorites Radar Kediri Distrindo collaboration with Honda and this is a great achievement for Khoirul Anam. Moreover, he had one year of teaching in schools, usually called by name Smaker.

"I'm just trying to appreciate the wants and needs of children," she says modestly. Khoirul is a geography teacher. With subjects that are often considered to be monotone, then Khoirul must be good students do not get around so easily bored. Not forever pupils simply overwhelmed by the subject matter. Sometimes interspersed with the latest info.

Providing information on the latest world developments could make students more open outlook. Making them larger meaning of science. Khoirul also open ourselves to all the questions from his students. Including the trivial in everyday though. "Like why the fish were dumb?" glutton said a variety of this book.

Another effort from Umi Hidayati husband is the use of visual aids or auxiliary equipment. Start globe to LCD projectors. Humor was not taboo inserted every teaching. Because humor can not make them tense. Why can enter a nomination Khoirul favorite teacher? "Because Mr. Khoirul that person the same attention to students," explained Aliyyil Mustofa, students in grade 11 IPA 2.

Khoirul, the alumni IKIP Surabaya (now Unesa) was also active in various activities. Make him famous. That's why, no mere students in his class just to provide support, which was also not bribed to vote. Moreover, not only teach in Khoirul Smaker, but also in SMK Taruna Bakti Kertosono.

Other nominees are Djamaloeddin Roni. High school math teacher Pomosda Tanjunganom. Berputra five men, besides teaching also writes books. Until today, no fewer than three titles have been made. Ranging from Sufism to book reviews of books. "But I'm still having trouble looking for a publisher," said the teacher was a graduate of Unmuh Ponorogo. Kelihaiannya writing has been evident from several articles which appeared in national print and online media. People Mind Like www.pembelajar.com or Bandung. The writings were often dealt with students to provide motivation.

In addition to applying quantum methods in the classroom learning, Roni also applied their learning by teaching. "Thus, students learn the way of teaching the class," says this enthusiastic teacher born in 1971. Roni is also trying to make the lessons so enjoyable in the eyes of students. "I have always been understanding to the situation of students," he admits.

For example, when the time is stepped on during the day, the man's home Magetan will not give weight material. In addition, Roni also spend time when there are students who want to meet outside class hours. Such as for consultation or other yan.

Style is what seems to make Pomosda Technology High School faculty is much preferred. The proof, in 2000 ago, hobbyist table tennis is also elected to be a favorite teacher at her school. Two nominations are another favorite teacher, I Gede Dewa Purbowo, teachers and Suismoyo SMA 2 Pare, Pare teachers from Hasanuddin MA. For Bowo, I Gede Dewa Purbowo greeting, he entered as a nomination election is very surprising. "Kan still many decent and better than me," he said.

Differences with Bowo, students at SMAN 2 Pare actually feel the opposite. Bowo worthy of being a favorite teacher because of the discipline but could be close to his pupils. A humorous figure also became the reason. For Bowo, discipline is not to scare. Conversely, Bowo try to create an atmosphere that is not tense. So that students can be fun and easy to receive materials.

In order for the Japanese language lesson, he teaches, the students could understand, Bowo stressed that every time the use of language teaching. Finally, the condition of the class very much alive. Not infrequently, because the headmaster rebuked Bowo class so noisy. "How about, learning the language that was trained to speak. If silence means you do not learn," said the man descended Bali.

Bowo have a quick trick for his students can. When you go to class, they had to say greetings in Japanese. "Anyway, if you want to go they should be greeted with the Japanese language. Similarly, if consent to the bathroom," explained Bowo. Whether because of it or just for fun, school bathroom wall is now a lot of graffiti. Of course, in Japanese.

Meanwhile, large ke10 Suismoyo admitted escape is pride. Moreover, he had to compete with other teachers and schools come from your favorites. "It was like they had elephants, I was an ant," Suis said modestly. However Suis another opinion. Hopefully with the inclusion of him into the top 10 favorite teacher it could be a passion for other teachers. Even he hopes this kind of competition could be more often held to give appreciation to the unsung heroes that have been underestimated.

Read More..

linux at pomosda

Located in POMOSDA Nganjuk (Pondok Modern Resources At-Taqwa), has conducted workshops Linux server date 28 February 2010. server fields such as webserver, database, and the mailserver peeled from the concept and who have applied by KPLI Kediri. STT Pomosda students eager to learn the service server and desktop Linux.

For entertainment, Mas Jati from N 2 Kediri demonstrating once practiced on the Compiz Fusion in Ubuntu. Seeing an interesting feature in Compiz and reliable Linux as a server, it is planned to hold regular workshops for each type of server services.

STT-POMOSDA are in the midst of rural communities, precisely in the hamlet of Cape District Tanjunganom, Nganjuk, East Java. Campus POMOSDA atmosphere surrounded by rice fields and gardens of the population, giving a natural feel and is beautiful, far from the hustle and bustle of busy as well as urban environments. POMOSDA campus occupying approximately 30 000 square meters on the land the building stands three blocks, with total area of about 5500 square meters. Since the year 2006 began to be implemented student activities facility development, with the construction of Multipurpose Building that can be used for various events Sports and Arts activities.

in STT POMOSDA there are two departments of Industrial Engineering and informatics techniques. STT is the purpose of education student memebina yag ukril skilled and so later in a society that ............? sip dah deh very cheap and low school principal in the STT pomosda, I know the love of money monthly which STT pomosda very cheap boarding .....?

fasilaitas available in STT pomosda pomosda are
================================================== ==================
1. computer lab
2. dormitory (for those who want to boarding)
3. hotspot (pomosda hotspots, free hotspots telecom, SMC, etc)
Fourth. Comfortable classrooms

Read More..
 

Mhabibie's web | Mhabibie's BLog