Politics and the Internet
Jan 10th, 2012
As we approach another presidential election, it is interesting to look back on how the internet has evolved through the last fifteen years of politics. An early moment in the modern technical era of politics was the creation of a GOP Internet forum in 1997 at freerepublic.com. In 1998, the website moveon.org was created for progressives as a political community formed in response to the impeachment of President Bill Clinton.
Over the years, the internet has been used in many different ways to help and hinder political campaigns. Today, there are thousands of websites that relate to politics.
One popular use of the internet by politicians has been online fundraising. In 2000, Sen. John McCain managed to raise more than $500,000 over the internet in less than 24 hours after he won the New Hampshire primary. This was a significant amount of money at that time, and was a significant moment for online fundraising. In 2007, Ron Paul raised $4.3 million in 24 hours on November 5 largely through online donations, then again on December 16 his campaign brought in $6 million in 24 hours.
Also in 2000, the use of online ads became quite popular. In that campaign year, Republicans ran more than 20 unique banners on 35 websites, while the Democrats ran a single banner ad on Yahoo. The use of online ads evolved over the years and culminated in Democrat Scott Murphy's successful 2009 congressional district election which was supported by the new Google Blast Advertising Campaign, which blanketed sites running Google AdSense with Murphy ads targeted to people in his district.
In 2002, blog sites were not as common as they are today. Markos Moulitsas burst onto the scene with his blog site dailykos.com, and two years later he was among the first bloggers given press credentials to cover the Democratic National Convention in Boston. Over the years, well written blogs have garnered the attention of potential voters, so blog sites have become instrumental in all campaigns.
In addition to blog sites, social media has become a widespread online campaign method. Just like selling products, selling a candidate via social networking has become an art form. In 2006, Georgia Rep. Jack Kingston was one of the first to utilize social media by posting a video of what his campaign called Mailtube on YouTube, an attempt to reach out to constituents through the use of online video.
In 2007, President Barack Obama took social networking to a new level with my.barackobama.com, which helped organize volunteers and supporters online. Facebook and Twitter also gave rise to an enormous amount of political activity in 2008. Facebook Connect was also launched which was a set of APIs from Facebook that enabled Facebook members to log onto third-party websites. This led to the integration of political websites and social networking websites, allowing a campaign to send out messages to the online community including Facebook and Twitter.
With elections fast approaching, how can you take advantage of your website hosting account to participate in the coming elections? If you have a blog that garners enough visitors, you could be selling political campaign ads, or even get yourself media credentials for campaign events. In the end, the freedom to voice your opinion via your website is powerful, so don't keep quite...speak up now!
Over the years, the internet has been used in many different ways to help and hinder political campaigns. Today, there are thousands of websites that relate to politics.
One popular use of the internet by politicians has been online fundraising. In 2000, Sen. John McCain managed to raise more than $500,000 over the internet in less than 24 hours after he won the New Hampshire primary. This was a significant amount of money at that time, and was a significant moment for online fundraising. In 2007, Ron Paul raised $4.3 million in 24 hours on November 5 largely through online donations, then again on December 16 his campaign brought in $6 million in 24 hours.
Also in 2000, the use of online ads became quite popular. In that campaign year, Republicans ran more than 20 unique banners on 35 websites, while the Democrats ran a single banner ad on Yahoo. The use of online ads evolved over the years and culminated in Democrat Scott Murphy's successful 2009 congressional district election which was supported by the new Google Blast Advertising Campaign, which blanketed sites running Google AdSense with Murphy ads targeted to people in his district.
In 2002, blog sites were not as common as they are today. Markos Moulitsas burst onto the scene with his blog site dailykos.com, and two years later he was among the first bloggers given press credentials to cover the Democratic National Convention in Boston. Over the years, well written blogs have garnered the attention of potential voters, so blog sites have become instrumental in all campaigns.
In addition to blog sites, social media has become a widespread online campaign method. Just like selling products, selling a candidate via social networking has become an art form. In 2006, Georgia Rep. Jack Kingston was one of the first to utilize social media by posting a video of what his campaign called Mailtube on YouTube, an attempt to reach out to constituents through the use of online video.
In 2007, President Barack Obama took social networking to a new level with my.barackobama.com, which helped organize volunteers and supporters online. Facebook and Twitter also gave rise to an enormous amount of political activity in 2008. Facebook Connect was also launched which was a set of APIs from Facebook that enabled Facebook members to log onto third-party websites. This led to the integration of political websites and social networking websites, allowing a campaign to send out messages to the online community including Facebook and Twitter.
With elections fast approaching, how can you take advantage of your website hosting account to participate in the coming elections? If you have a blog that garners enough visitors, you could be selling political campaign ads, or even get yourself media credentials for campaign events. In the end, the freedom to voice your opinion via your website is powerful, so don't keep quite...speak up now!
Web Stats - What Does It Mean?
Jan 03rd, 2012
Now that you have a website up, you want to know how popular your website really is! You can enable stats in the Account Manager for all of your website hosting accounts, then visit your custom stats page to see what is going on when people head to your website.
We use Webalizer stats tracker to output the details of your website activity, and the stats page is generally updated every morning for the previous day. When you visit your stats page, you will see an overview of each months statistics. If you click an individual month, you will get more detailed information about that specific month.
Within the monthly view, there are many stats recorded and displayed, some of which may be confusing. Here, we will break down the individual stats displayed so you can better understand what they mean.
The first stat is HITS which is any request made to the server that is logged. These requests can be for anything, including html pages, graphics images, audio files, CGI scripts, etc. Each valid line in the server log is counted as a hit. This number represents the total number of requests that were made to the server during the specified report period.
The second stat listed is the FILES stat. Some requests made to the server require that the server then send something back to the requesting client, such as an html page or graphic image. When this happens, it is considered a 'file' and the files total is incremented. The relationship between 'hits' and 'files' can be thought of as 'incoming requests' and 'outgoing responses'.
The next stat listed is the PAGES stat. Generally, any html or php document, or anything that generates an html document, would be considered a page. This does not include the other items that go into a document, such as graphic images, audio clips, etc. This number represents the number of 'pages' requested only, and does not include the other features that are in the page. This stat is sometimes referred to as 'Pageviews' in other stats reporters.
Each request made to the server comes from a unique SITE, which can be referenced by a name or IP address. The 'sites' number shows how many unique IP addresses made requests to the server during the reporting time period. This does not mean the number of unique individual users (real people) that visited, which is impossible to determine using just logs.
Whenever a request is made to the server from a gien IP address, or website, the amount of time since a previous request by the address is calculated. If the time difference is greater than a pre-configured 'visit timeout' value, or has never made a request before, it is considered a 'new visit' and the VISITS stat total is incremented both for the site, and the IP address.
The KBytes, or kilobytes, value shows the amount of data, in KB, that was sent out by the server during the specified reporting period. This value is generated directly from the log file and is a fairly accurate representation of the amount of outgoing traffic the server had.
The Top Entry and Exit tables give a rough estimate of what URL's are used to enter your site, and what the last pages viewed are. Because of some limitations, this number should be considered a rough estimate, and will give a good indication of the overall trend in where users come into, and exit, your website.
The REFERRERS stat is much harder to analyze than a typical URL. What is contained in the referrer field of your log files varies depending on many factors, such as what site did the referral, what type of system it comes from, and how the actual referral was generated. This is a reflection of how a user got to your website, which may have been from a bookmark in their browser, they may simply type your websites URL into their browser, they could have clicked on a link on some remote web page, or they may have found your website from one of the many search engines and site indexes found on the web.
The SEARCH STRING stat is a good indication of what users were searching for when they found your website. The Webalizer will do a minimal analysis on referrer strings that it finds, looking for well known search string patterns.
Being able to read and understand the stats reported about your website will help you to know what is working, and what needs help.
We use Webalizer stats tracker to output the details of your website activity, and the stats page is generally updated every morning for the previous day. When you visit your stats page, you will see an overview of each months statistics. If you click an individual month, you will get more detailed information about that specific month.
Within the monthly view, there are many stats recorded and displayed, some of which may be confusing. Here, we will break down the individual stats displayed so you can better understand what they mean.
The first stat is HITS which is any request made to the server that is logged. These requests can be for anything, including html pages, graphics images, audio files, CGI scripts, etc. Each valid line in the server log is counted as a hit. This number represents the total number of requests that were made to the server during the specified report period.
The second stat listed is the FILES stat. Some requests made to the server require that the server then send something back to the requesting client, such as an html page or graphic image. When this happens, it is considered a 'file' and the files total is incremented. The relationship between 'hits' and 'files' can be thought of as 'incoming requests' and 'outgoing responses'.
The next stat listed is the PAGES stat. Generally, any html or php document, or anything that generates an html document, would be considered a page. This does not include the other items that go into a document, such as graphic images, audio clips, etc. This number represents the number of 'pages' requested only, and does not include the other features that are in the page. This stat is sometimes referred to as 'Pageviews' in other stats reporters.
Each request made to the server comes from a unique SITE, which can be referenced by a name or IP address. The 'sites' number shows how many unique IP addresses made requests to the server during the reporting time period. This does not mean the number of unique individual users (real people) that visited, which is impossible to determine using just logs.
Whenever a request is made to the server from a gien IP address, or website, the amount of time since a previous request by the address is calculated. If the time difference is greater than a pre-configured 'visit timeout' value, or has never made a request before, it is considered a 'new visit' and the VISITS stat total is incremented both for the site, and the IP address.
The KBytes, or kilobytes, value shows the amount of data, in KB, that was sent out by the server during the specified reporting period. This value is generated directly from the log file and is a fairly accurate representation of the amount of outgoing traffic the server had.
The Top Entry and Exit tables give a rough estimate of what URL's are used to enter your site, and what the last pages viewed are. Because of some limitations, this number should be considered a rough estimate, and will give a good indication of the overall trend in where users come into, and exit, your website.
The REFERRERS stat is much harder to analyze than a typical URL. What is contained in the referrer field of your log files varies depending on many factors, such as what site did the referral, what type of system it comes from, and how the actual referral was generated. This is a reflection of how a user got to your website, which may have been from a bookmark in their browser, they may simply type your websites URL into their browser, they could have clicked on a link on some remote web page, or they may have found your website from one of the many search engines and site indexes found on the web.
The SEARCH STRING stat is a good indication of what users were searching for when they found your website. The Webalizer will do a minimal analysis on referrer strings that it finds, looking for well known search string patterns.
Being able to read and understand the stats reported about your website will help you to know what is working, and what needs help.
PHP and MySQL
Dec 02nd, 2011
There are many open source, free scripts that you can use to create a website. But, you can also create your own website from scratch, only using the features you actually need. PHP and MySQL combine to be an easy yet powerful way to create dynamic web pages that interact with your visitors.
You can create useful and well formatted web pages with HTML, but with the addition of PHP and MySQL you can collect data from your users, create specific content on the fly, and do many other things that simple HTML alone cannot do. You can use PHP right inside your already existing HTML content, or put HTML tags right inside your PHP coding.
PHP and MySQL complement each other to do what neither can do alone. PHP can collect data, and MySQL can in turn store the information. PHP can create dynamic calculations, and MySQL can provide it with the variables it uses. PHP can create a shopping cart for your web store, but MySQL can keep the data in a format PHP can use to create receipts on demand, show current order status, or even suggest other related products.
Although PHP and MySQL can each be used independently, when you put them together it opens up countless possibilities for your site. It is becoming more and more necessary to deliver dynamic content to keep up with the demands of web surfers and their desire to have information instantly delivered to them online.
WordPress is one of the most popular PHP scripts available today, and it allows people with little to no coding knowledge to put up a professional website in minutes. However, if you took the time to identify exactly what you wanted from your blog website, and put in the effort to learn the PHP code necessary to accomplish those results, you could create your own script without all of the extra, unnecessary features included in the WordPress package.
Many open source scripts are filled with endless possibilities for your website. But what happens if you never use 90% of those features? The space those features occupy on the server is wasted, and your website has to comb through it all to determine which features to load and which to ignore when someone visits your website.
By taking the initiative to learn the PHP code required to design a website with only the features you require, and then designing efficient MySQL queries that will populate your website quickly with only the information necessary, you could have a screaming fast website with excellent dynamic content.
You can create useful and well formatted web pages with HTML, but with the addition of PHP and MySQL you can collect data from your users, create specific content on the fly, and do many other things that simple HTML alone cannot do. You can use PHP right inside your already existing HTML content, or put HTML tags right inside your PHP coding.
PHP and MySQL complement each other to do what neither can do alone. PHP can collect data, and MySQL can in turn store the information. PHP can create dynamic calculations, and MySQL can provide it with the variables it uses. PHP can create a shopping cart for your web store, but MySQL can keep the data in a format PHP can use to create receipts on demand, show current order status, or even suggest other related products.
Although PHP and MySQL can each be used independently, when you put them together it opens up countless possibilities for your site. It is becoming more and more necessary to deliver dynamic content to keep up with the demands of web surfers and their desire to have information instantly delivered to them online.
WordPress is one of the most popular PHP scripts available today, and it allows people with little to no coding knowledge to put up a professional website in minutes. However, if you took the time to identify exactly what you wanted from your blog website, and put in the effort to learn the PHP code necessary to accomplish those results, you could create your own script without all of the extra, unnecessary features included in the WordPress package.
Many open source scripts are filled with endless possibilities for your website. But what happens if you never use 90% of those features? The space those features occupy on the server is wasted, and your website has to comb through it all to determine which features to load and which to ignore when someone visits your website.
By taking the initiative to learn the PHP code required to design a website with only the features you require, and then designing efficient MySQL queries that will populate your website quickly with only the information necessary, you could have a screaming fast website with excellent dynamic content.
MySQL Maintenance
Nov 10th, 2011
Setting up a website that utilizes a database is the first step in a lifetime of successful website activity. Once you have a perfect database configured and attached to your website, you are off and running. However, you cannot simply rest on your laurels once you launch your website, you will need to periodically make sure all of the databases on your website hosting account are running appropriately.
Lets use our auto parts warehouse as an example again. Once you have filled your warehouse with all the parts you need, and properly organized your parts in rows that are easily navigated, you cannot simply leave the warehouse alone forever. As time goes by, you have to do some cleanup and re-organizing. As you add new products, move existing products, or discontinue unnecessary products, you need to make changes to your organization structure to reflect these changes and keep your warehouse organized and easy to navigate.
Likewise, as you continuously add new data to your database, move or change existing data in your database, or remove data completely from your database, you will need to perform maintenance on your MySQL database to keep it organized properly. If you make a lot of changes to your database, but you do not routinely perform maintenance on it, your website queries will begin to slow down, and potentially come to an abrupt halt.
There are four commonly used maintenance tools, which can be found in phpMyAdmin or you can run them yourself. These tools are used periodically to make sure your MySQL database is functioning properly, and efficiently.
There are two tools you would use to essentially make sure that your database is not broken. It is possible for your database to be corrupted, and you may experience failed queries or errors on your website as a result. To ensure that your database's structure and content does not have any problems, you would use the Check Table tool.
The Check Table tool will perform an integrity check on the table structure and its contents. If there are any problems with the structure or the contents, it will report the errors letting your know that there is a problem. If the Check Table process reports an error, you will then want to use the Repair Table tool. The Repair Table tool corrects problems in a table that has become corrupted. This tool does have limited use, and sometimes doing a full restore from a backup is better.
The other two maintenance tools you should be using periodically are used to ensure that your tables are running smoothly, and performing their duties the best they possibly can. The first of these tools you would want to use is the Analyze Table tool. This tool updates statistics about the distribution of index key values. This information is used by the optimizer to generate execution plans for queries.
After you have run the Analyze Table tool, you will want to use the Optimize Table tool. This tool re-organizes a table so that its contents can be accessed more efficiently. The Optimize Table tool will clean up a table by defragmenting it. This reclaims unused space resulting from deletes and updates, and coalescing records that have become split and stored non-contiguously. Optimize Table also sorts the index pages if they are out of order and updates the index statistics.
For advanced MySQL users, you can also use the Explain statement to gain more information about a MySQL query to determine if it is efficient. Running a MySQL query with EXPLAIN before it will display information from the optimizer about the query execution plan. MySQL will “explain” how it would process the statement, including information about how tables are joined and in which order.
With the help of EXPLAIN, you can see where you should add indexes to tables so that the statement executes faster by using indexes to find rows. You can also use EXPLAIN to check whether the optimizer joins the tables in optimal order.
If you take the time to perform routine maintenance periodically, you can ensure that your MySQL databases are configured efficiently, your queries are operating at top speed, and your web site is performing fantastically. Make sure you keep the warehouse clean and organized, and you will save yourself from the headache of trying to resurrect a dead website.
Lets use our auto parts warehouse as an example again. Once you have filled your warehouse with all the parts you need, and properly organized your parts in rows that are easily navigated, you cannot simply leave the warehouse alone forever. As time goes by, you have to do some cleanup and re-organizing. As you add new products, move existing products, or discontinue unnecessary products, you need to make changes to your organization structure to reflect these changes and keep your warehouse organized and easy to navigate.
Likewise, as you continuously add new data to your database, move or change existing data in your database, or remove data completely from your database, you will need to perform maintenance on your MySQL database to keep it organized properly. If you make a lot of changes to your database, but you do not routinely perform maintenance on it, your website queries will begin to slow down, and potentially come to an abrupt halt.
There are four commonly used maintenance tools, which can be found in phpMyAdmin or you can run them yourself. These tools are used periodically to make sure your MySQL database is functioning properly, and efficiently.
There are two tools you would use to essentially make sure that your database is not broken. It is possible for your database to be corrupted, and you may experience failed queries or errors on your website as a result. To ensure that your database's structure and content does not have any problems, you would use the Check Table tool.
The Check Table tool will perform an integrity check on the table structure and its contents. If there are any problems with the structure or the contents, it will report the errors letting your know that there is a problem. If the Check Table process reports an error, you will then want to use the Repair Table tool. The Repair Table tool corrects problems in a table that has become corrupted. This tool does have limited use, and sometimes doing a full restore from a backup is better.
The other two maintenance tools you should be using periodically are used to ensure that your tables are running smoothly, and performing their duties the best they possibly can. The first of these tools you would want to use is the Analyze Table tool. This tool updates statistics about the distribution of index key values. This information is used by the optimizer to generate execution plans for queries.
After you have run the Analyze Table tool, you will want to use the Optimize Table tool. This tool re-organizes a table so that its contents can be accessed more efficiently. The Optimize Table tool will clean up a table by defragmenting it. This reclaims unused space resulting from deletes and updates, and coalescing records that have become split and stored non-contiguously. Optimize Table also sorts the index pages if they are out of order and updates the index statistics.
For advanced MySQL users, you can also use the Explain statement to gain more information about a MySQL query to determine if it is efficient. Running a MySQL query with EXPLAIN before it will display information from the optimizer about the query execution plan. MySQL will “explain” how it would process the statement, including information about how tables are joined and in which order.
With the help of EXPLAIN, you can see where you should add indexes to tables so that the statement executes faster by using indexes to find rows. You can also use EXPLAIN to check whether the optimizer joins the tables in optimal order.
If you take the time to perform routine maintenance periodically, you can ensure that your MySQL databases are configured efficiently, your queries are operating at top speed, and your web site is performing fantastically. Make sure you keep the warehouse clean and organized, and you will save yourself from the headache of trying to resurrect a dead website.
MySQL Optimization
Oct 28th, 2011
When it comes to utilizing a database to support your website, it is helpful to understand how your database works with your website, and how to make every database on your website hosting account more efficient. A database is a large collection of data, similar to a warehouse full of goods. How well you organize those goods in the warehouse determines how quickly you can find an individual item when you need it.
Consider your database an auto parts warehouse. If someone came into the warehouse and told you they needed a spark plug, how easy would it be for you to find that spark plug if you had no organization in your warehouse? You would have to walk up and down each aisle looking in each box to see if that box contained spark plugs. This could take forever!
A MySQL database puts your data into tables that are easy to navigate. This would equate to putting your auto parts into specific aisles in your warehouse. Now, you would know which aisle your spark plugs were in, so you would only have to look into each box in one aisle until you found those spark plugs. This is much better than having to go through the entire warehouse, but still could take some time since there may be thousands of items in one table that you still have to sift through to find specific data.
Optimizing your MySQL database is the best, most efficient way to improve the performance of your website. Instead of just connecting your website to a database, and letting your queries wander around your database aimlessly looking for specific data, you can create indexes that guide your queries directly to the proper location of the requested data. Now you can walk directly through that auto parts warehouse to the aisle with the spark plugs, and know exactly where on that aisle the box of spark plugs is.
Indexes are created on a per column basis. If you have a table with the columns: name, address, telephoneNumber, and birthdate and want to create an index to speed up how long it takes to find birthdate values in your queries, then you would need to create an index for birthdate. When you create this index, MySQL will build a lookup index where birthdate specific queries can be run quickly.
It is not necessary to create an index for every column, but any column which is queried frequently could benefit from an index. Creating indexes for your tables is crucial for your database, it allows it to perform faster and more efficiently than it would normally.
If you use well written queries with efficiently indexed tables, you will find that your websites load incredibly fast compared to poorly written queries with no indexes. When you get started working on your website, take the time to analyze each table you create before you launch, just to make sure it is optimized and ready for action.
You may not realize that certain columns are going to be utilized quite as much as you expected, so it is also important that you revisit your databases on a regular basis to determine which tables and columns are working efficiently, and which ones have slowed you down. In our next blog entry, we will discuss MySQL database maintenance in greater depth.
Consider your database an auto parts warehouse. If someone came into the warehouse and told you they needed a spark plug, how easy would it be for you to find that spark plug if you had no organization in your warehouse? You would have to walk up and down each aisle looking in each box to see if that box contained spark plugs. This could take forever!
A MySQL database puts your data into tables that are easy to navigate. This would equate to putting your auto parts into specific aisles in your warehouse. Now, you would know which aisle your spark plugs were in, so you would only have to look into each box in one aisle until you found those spark plugs. This is much better than having to go through the entire warehouse, but still could take some time since there may be thousands of items in one table that you still have to sift through to find specific data.
Optimizing your MySQL database is the best, most efficient way to improve the performance of your website. Instead of just connecting your website to a database, and letting your queries wander around your database aimlessly looking for specific data, you can create indexes that guide your queries directly to the proper location of the requested data. Now you can walk directly through that auto parts warehouse to the aisle with the spark plugs, and know exactly where on that aisle the box of spark plugs is.
Indexes are created on a per column basis. If you have a table with the columns: name, address, telephoneNumber, and birthdate and want to create an index to speed up how long it takes to find birthdate values in your queries, then you would need to create an index for birthdate. When you create this index, MySQL will build a lookup index where birthdate specific queries can be run quickly.
It is not necessary to create an index for every column, but any column which is queried frequently could benefit from an index. Creating indexes for your tables is crucial for your database, it allows it to perform faster and more efficiently than it would normally.
If you use well written queries with efficiently indexed tables, you will find that your websites load incredibly fast compared to poorly written queries with no indexes. When you get started working on your website, take the time to analyze each table you create before you launch, just to make sure it is optimized and ready for action.
You may not realize that certain columns are going to be utilized quite as much as you expected, so it is also important that you revisit your databases on a regular basis to determine which tables and columns are working efficiently, and which ones have slowed you down. In our next blog entry, we will discuss MySQL database maintenance in greater depth.