|
just another regularban.info web blog |
| MEMBERS: | Using Functions
Functions are used to perform a well defined task that is normally repeated at various places within a web site, web application, or other software application. The function sometimes needs certain information before performing its task, and sometimes returns a value to the calling page or program. An example of how to use a simple function in PHP: function showMessage() {The above example shows a very simple function that displays the contents of a session variable called 'message'. The idea being that while a user is using a web site, etc, various messages are generated and stored in the 'message' session variable. Whenever the showMessage function is called, the contents of the session variable are displayed. So, for example, when the user logs on, you could display a message saying that they have done so. Likewise, when they log off, a different message could be displayed. Calling a function To call the showMessage function, you would just need to include the line: showMessage() in the web page (wrapped in php tags to distinguish it from normall HTML). Passing values to a function Often, a function requires one or more input values in order to perform its task. For example, take the following example that takes two numbers as input, and adds them together. The result is then returned to the calling web page or program. function addNumbers($number1,$number2) {In the calling program we would have something similar to the following: $number1 = "5"; Obviously, in a real program you would not have the numbers hardcoded like this, but they would be obtained from user input or by some other means. Notice also that although the name of the returned variable is $answer, the calling program makes no reference to that. We could, if we wanted to, change the calling program to: $answer = addNumbers($number1,$number2); which might make things slightly easier to understand.
Web Analytics
I've done quite a bit of research into web analytics lately, and I have found a couple of things. Google analytics Is a great tool, but it cannot be the only tool an organization relies on. Because it is a purely JavaScript based, it is unable to catch browsers that do not have JavaScript enabled, this includes the search engine robots, some hand held devices, as well as a percent of users that manually turn this off. That being said we need a tool to parse the log files from the server and to give us information about these users, as well as providing us with "on demand" stats where as Google's stats are next day. The server logs also contain a wealth of other information that we are collecting automatically, so we might as well take advantage of it. I have come to the conclusion that we need to use Google Analytics but we also need a tool that reads the server logs. There are quite a variety of tools that would fill this need. Google recently purchased Urchin who's web analysis product runs Google analytics, costs about $3k and will work with the Google Mini, Urchin also gives the ability to read logs from server software other than IIS (like apache, the software used for open source applications) . Urchin will be releasing another version shortly, and this will be the first release since the Google buyout. Another option is WebTrends Analytics it costs about $4k. It Like Urchin will read both IIS and Apache logs, and has a web interface for users. The last product is NetTracker, it runs about $4k for the software, and another grand for support. it was recently bought out by Unica. The administration of netTracker is not the smoothest, and the support seems to have declined on quality since the buy out.
Tips for Building a Successful Website
In order to truly profit from the internet, one needs a website. There are many programs available that offer free websites but these will not bring about the profit that most people truly desire. What makes the free websites so unsavory is their cookie cutter appearance. All these websites are exactly alike visually and most carry the same content. Original content is what sells best on the internet. For this reason, potential internet marketers should make their initial investment in a domain name. Before selecting a domain name, however, research must be conducted to determine the best items to sell. The way that search engines find websites is with their keywords. By selecting a domain name that is laden with keywords, that site will be more highly indexed by the web crawlers. For this reason, a product needs to be selected in order to appropriate the best domain name for that product. After a product has been selected and a domain name purchased, content needs to be added to the site. Make sure to use appropriate headers that are short, sweet, and full of keywords. Make the site user friendly and visually pleasing. Products should be on the site next. As stated in the beginning, original content is best. However, developing your own content can incur cost and time. If just starting out, you can sell other people's product to get your business started. After products are placed, make sure to make your site viral by placing a tell-a-friend feature on the site. This will help to drive more traffic to the site with little effort on your part. Also add an email capture function, and forum if possible. The email capture will help to build a list of potential customers whether you have made a sale to them yet or not. The forum option will bring repeat visitors to the site. These are just a few ways to make your site successful and profitable.
|
* About Archives
Categories:
Last Updated: |
| regularban.info
is proudly powered by WordPress MU running
on regularban.info.
Create a new blog and join in the fun! Entries (RSS) and Comments (RSS). |