A list of all the PHP $_SERVER global variable arguments with example output.
||Server IP: 220.127.116.11
||Apache/2.2.15 (Win32) JRun/4.0 PHP/5.2.13
||GET / POST / PUT / HEAD
||Request start time: 1280149029
||Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:18.104.22.168) Gecko/20100625 Firefox/3.6.6 ( .NET CLR 3.5.30729)
||Client server's host name
||Version signature: 5.123
Referenced from php.net $_SERVER manual.
Do I Need a Website?
In a few short years all businesses will have a website. In fact it is quite uncommon to see a business without a website even these days. I will sum up in a few short points why having a website is a great addition to your business and will pay for itself in the long run.
Once your website is built and online it acts as free advertising. Nearly 1.5 million Google searches are done every minute according to recent statistics. This means there are literally thousands of people out there able to find your website, without even beginning to consider other search engines such as Yahoo or Bing.
A good looking website inspires a lot of trust in potential customers. Many people browse the internet to research possible choices when looking for a product or service. Having a professional user-friendly website can make all the difference between making a sale and giving business away to your competitors.
New Communication Channels
A website offers a whole new level of communication between your company and your customers. Many people do not enjoy speaking on the phone to a company; your website will offer alternatives such as email, address to mail or even live chat online.
A website can even be used to let customers type in how they feel and leave comments which you can reply to, letting the customer know you care for them and value their custom.
Keep Customers Up To Date
A website can be used to launch important news announcements about your company straight to the public through your blog, news feeds or even a monthly newsletter.
Time is Money
A well used clichÃ© in the business world â€“ but often this is proven true. Having a website can improve business efficiency a hundredfold. Instead of having scraps of paper lying around detailing invoices and day to day notes, store these online where they are always available to you, in your office or at home.
Once you have a website helping you run the business you can do all sorts of interesting things such as run reports on sales, backup client information and provide news updates to your staff.
To wrap all of this information up for you, the main point of a business website is to pull in more customers and sell more of your product. Websites are quick and easy to setup; once they are online your customer base will begin to grow immediately, with the handy side effects of bringing in more money and growing your business quicker than you thought possible.
If you've ever wanted to find the complete current URL of the page you are on using PHP, it's easy using PHP's built in $_SERVER global variables.
To break it down, we start with a string writing the "http://".
We then use the period (.) character to concatenate on the server name. $_SERVER['HTTP_HOST'] returns the name of the server. e.g. 'localhost' or 'www.blakes-site.co.uk'.
Finally we concatenate on $_SERVER['REQUEST_URI'] using the period character again. Request URI returns the current page you are accessing on the server e.g. '/blog/view.php'
To show a URL without the 'http://', for simpler presentation simply don't add this string at the start.