Archive for June, 2007

Guide to Teamwork

Tuesday, June 19th, 2007

I’ve started a new section called ‘Life’ which I plan on publishing various self-improvement articles and short stores. This article is about Teamwork and I hope you will find it useful in your own Life and Work. ~

In the work force today, more and more companies are relying on teamwork to achieve projects and to set goals for the company. No longer do you see power hungry managers controlling every faucet of the work flow and day. In order to be successful, both managers and employees must work together to provide products that meet the needs of the customer and are profitable. For the company that does not empower their employees to achieve their goals through teamwork, it will certainly result in failure of a product. Of all of the skills that are most important in the business world today, teamwork is high on my list. My own experience has shown that teamwork means placing the teams objectives above your own, displaying sound judgment in your decisions and helping your teammates obtain their objectives.

Placing the objectives of the team first, rather than your own agenda, is a good sign that you are practicing teamwork. In the company I work for I have seen teams disintegrate into pure chaos as each member will try to push through their own agenda. The problem with members having their own agenda is that nothing will ever get accomplished and in the end, the goals that the team set out to achieve, will never be made. To be a successful team player, you must remember what the goals of the team are and stick with them. Some of the most successful teams in the sports world have great athletes who are also great team players. For example, Larry Bird of the Boston Celtics was a great athlete, but he was also a great team player who on many occasions would unselfishly set his teammate up for a play, rather than take the shot himself. Learning not to be selfish in tackling the objectives of the team is the first step towards building teamwork skills and in finding success within a team. But this skill alone will not build you into a great team player.

Realizing that the image of the team is reflected in your own actions – this is called sound judgment -  is another important step in learning what teamwork means. This holds true not only for work related teams, but in sports teams and in family teams. Poor judgment in the actions you take will certainly result in embarrassment for the team you are on and in the credibility of the team. Take for example the recent incident with Drew Bledsoe of the New England Patriots. It was not the great pass or completion of a play that earned him the undivided attention of the news media, rather, it was his actions at a local Boston bar, (jumping foolishly into a crowd of people),  that resulted in his picture on the front page of the Boston Herald. This reflects poorly not only on Drew Bledsoe, but on the New England Patriots as a organization. Six months from now, most individuals outside of New England will not remember the name of the player who displayed poor judgment, but they will remember that he was a member of the New England Patriots. Displaying sound judgment in the actions and decisions you make will put you on the road to becoming a successful team player.

The most important part of being a team player is helping your teammates achieve their goals. The very basis for teams is the concept that each member of the team will help other teammates out so that the team, as a whole, will move ahead and achieve success. A good example of this teamwork can be found in the traditional family. My own experience shows that when a member of the family suffers a setback or is having a tough time with work or school, the members of the family come together to help the family member with their support. This, by far, is the greatest asset of teamwork and is the very basis for why good teams can be so successful. Translating this to the business and sports world has equal similarities. For example, a team that is created for the purpose of researching, creating and introducing a new product will rely on the strength of its team members in the event that a team member suffers a setback; a divorce, death or other misfortune. Suddenly, the team is focused on what its members can do to help the ailing teammate. This is the magic that builds successful teams and the acquired skills that go along with teamwork.

Teamwork certainly is an important part of our everyday lives. If you think about it, almost everyone will play a part in the makeup of a team at some point in their lives. It is up to you, as a team member, to display and work towards the skills of teamwork. By focusing on the skills I have mentioned -  putting the team objectives first, displaying sound judgment and helping your teammates obtain their objectives – you will certainly find success in using teamwork in your endeavors for success. This is what teamwork means to me.

PHP Domain Redirect

Sunday, June 17th, 2007

Our PHP Domain Redirect script is the perfect choice when you are parking domains at one central location and you need to split the web traffic to different addresses based upon the URL name. 

For example, say your primary location is firstdomain.com, but you also own a second domain name that is parked at this location (seconddomain.com). The key is to create different directories to store each website and then funnel the traffic based upon the domain name.

To accomplish this in PHP we employ a special PHP server variable called $_SERVER["HTTP_HOST"]. This variable contains the name of the URL as entered in the address bar of the web browser. You can find a list of all of the special PHP server variables on PHP.net. Some of the variables available are the document_root (contains the root location), http_referer (from what URL the vistor arrived at your site), http_user_agent (shows the browser and version of the vistor).

<?php 

$domain = $_SERVER["HTTP_HOST"];
if (($domain == "celtichearts.com") ||
   ($domain == "www.celtichearts.com")) { 

   header("location: http://www.celtichearts.com/mail"); 

} 

if (($domain == "webcelt.com") ||
   ($domain == "www.webcelt.com")) { 

   header("location: http://www.webcelt.com/news"); 

}
?>

Our script’s first job is to grab the URL from the address bar by using the server side variable $_SERVER["HTTP_HOST"]. We simply place that in the variable $domain and then test for each website – redirecting based on the name of the web address.

In this example, we show how The WEB CELT website uses PHP Domain Redirecting to host 2 different websites at one location. Because our hosting provider only allows 1 primary domain (www.celtichearts.com), we park the domain (www.webcelt.com) and then redirect both to the appropriate location.

Redirecting is accomplished by using PHP’s header() command. Remember that header() must be called before any actual output is sent, either by normal HTML tags, blank lines in a file, or from PHP – otherwise this will result in a nasty error.

And that is our quick and dirty PHP Domain Redirect Script. This is the perfect solution when you need a means to direct your vistors to different parts of your website based upon the URL the vistor entered. It is also a great way to accomplish redirects without learning or using .htaccess. Although I am sure we will be talking about .htaccess commands in future posts to The WEB CELT!

Welcome to The WEB CELT!

Sunday, June 17th, 2007

Hello and welcome to The WEB CELT! My name is Paul MacArthur and I have created this site to share with you the technology, programming and knowledge that I have gained while running a popular Internet Radio Broadcast – Celtic Radio!

My hope is to create a site that contains help guides and programming examples covering a wide range of topics – such as PHP, Javascript, Linux, broadcasting, music, radio and more!

Beyond that I hope to take a little different road than a purely “technology” website would travel. ”Every Day Ramblings” will be about my own life adventures and I will be including a special section called the “Guide to Life.” These sections will contain self-improvement articles, short-stories, science, religion, politics and anything else that does not fit under a category! :)

So, why The WEB CELT? – It just seems like such a natural fit given my interest and enthusiam in all things Celtic! Now we are not talking about witches or warlocks, we are talking about the ancient peoples of Scotland, Ireland, Wales, Isle of Man, Galicia, Cornwall and Brittany. These were the lands of the Gaels and where my interest started in this web adventure called “Internet Radio.”

I’ll try my best to categorize and organize the posts here, so as to make a useful and working website. Along the way, feel free to post comments or to just give me a shout if you have a question. I am more than willing to help you out with specific questions on programming,  music and radio technology. Who knows, maybe we will post your question and answers here!

Again thanks for stopping by and Welcome to The WEB CELT