Servage Magazine

Information about YOUR hosting company – where we give you a clear picture of what we think and do!

Chronological article list (Blog View)

Blog View vs. Front PageThis page lists all articles by date (blog-like) and is therefore a good alternative to the front page that sorts pages by popularity. If you prefer chronological listing of the newest articles you should use this page.

Blueprint CSS Framework makes CSS styling easy

Monday, May 21st, 2018 by Servage
The last post about nicer forms introduced some simple CSS tricks to get nice looking forms. It also mentioned the Blueprint CSS framework, which is pretty nice. Blueprint is basically just a set of stylesheets (.css files) that you can include in your website to get certain default design and layout functionality. Why is this great? You often want to do similar things with your web projects in terms of design. Blueprint offers help with exactly that. It makes your standard pages look good, and gives you a great starting point for further customization. It's much better than using the various browsers' own default styling. The features CSS reset of styles to ...

Code tips for .htaccess files

Monday, May 14th, 2018 by Servage
The .htaccess files are often underrated and forgotten, but they do have great powers to manipulate your web server. It's possible to set and change various server settings, for example the Apache configuration. Thereby you can have individual configurations based on files in folders, rather than configuration files that require server restarts to take effect. You can also change settings for plugins, like PHP settings. I've stumbled over a few great .htaccess snippets here, which I found quite useful and wanted to share.

Lightweight CMS for your websites

Monday, May 7th, 2018 by Servage
PulseCMS is a lightweight content management system for small websites that just need basic features - which are most of the sites out there! Core features PulseCMS is easy to install. It only requires a PHP webhost like Servage. No database is required because the CMS works with files alone. This improves performance. Rebranding and localization are possible, so you can even let your customers work directly on their own websites. Good for international users or if you are a web agency Content editing works with editable blocks defined in the HTML templates. It includes a simple WYSIWYG (What your see is what you get) editor for content manipulation. There is a function ...

PHP-like in_array function in JavaScript

Monday, April 30th, 2018 by Servage
Recently I once more found myself in a situation where I really felt that I am a PHP-developer, more that a JavaScript-developer. Do you also find your self writing stuff like in_array() in JavaScript code? It happens often to me, that I take for granted in other languages, what I know and love in PHP. It also often takes quite a while to find a good alternative for missing functions in JavaScript, since Google often provides you with multiple options. One of the common functins I miss in JavaScript from PHP is in fact the "in_array"-function. Luckily there is a splendid JavaScript snippet here: function in_array (needle, haystack, argStrict) { ...

HTML parser in PHP

Tuesday, April 24th, 2018 by Servage
Are you ever struggling with HTML content in PHP? Do you need to parse a HTML source? Going through a HTML document in order to extract data might seem like a complicated, or even wrong, way of approaching a problem. Surely there must be another way... Well, sometimes other ways aren't available, sometimes the quick and dirty HTML extraction is simply the easiest way to get things done. Therefore you might find yourself in situations where a working HTML parser for PHP would be a real help. PHP Simple DOM Parser by C.C. Chen is a PHP class that does exactly what I described above. It's available from Sourceforge. It can ...

Beautiful color selection made easy

Tuesday, April 17th, 2018 by Servage
Have you ever been trying to figure out how to get the colors for your web project design to match each other? Or have you ever been stuck trying to find suitable colors for a website that should match an existing logo to integrate in the corporate identity? Color selection can be easy if you know exactly what you want, but mostly you are starting from scratch, maybe with an idea or preset main color. However, how do you define proper fitting colors to go along with the main color, to both fit the intended design and be aesthetic at the same time? Maybe you have heard of complementary colors? Being ...

Create a cool CSS-based tab-menu

Tuesday, April 10th, 2018 by Servage
We received a lot of great feedback for our CSS-based dropdown menu, so I thought it would be time for another little tutorial. This time showing how to create a nice-looking tab-menu, based purely on HTML and CSS. See a live tabmenu example here. First, we want to have the menu code created in HTML. I find that the most appropriate way of doing this, is by creating the menu as a list. Thereby non-supporting browsers will still show the menu as a list, which somewhat resembles a menu. Everyone else will see the cool tab-menu :-) <ul class="tabmenu"> <li><a href="">Overview</a></li> <li class="active"><a href="">About</a></li> <li><a href="">Products</a></li> ...

GeoIP Security

Sunday, April 8th, 2018 by Servage
geoip_wildcardsThe Servage  GeoIP Security supports the use of wildcards to allow IP ranges in addition to specific IPs. This means you can allow entire blocks of IP addresses with one setting, instead of having to add each address individually. What does the GeoIP Security feature do? It enables you to restrict access to login to your Servage account based on the user's country or IP address. You find it in the control panel at "Your Account > GeoIP Login Security". Allowing specific addresses: 12.34.56.78 34.56.78.90 ... Allowing address ranges: 12.34.56.* This allows any address starting with 12.34.56 12.34.* This allows any address starting with 12.34 ... Allowing countries: Simply select the ...

Create nice documentation for your PHP code

Tuesday, April 3rd, 2018 by Servage
It's a common problem amongh developers that insufficiently or no documentation of code causes problems, delays, misunderstandings. Even code you wrote yourself could look really strange after a while, when you no longer remember what's exactly going on. At this point a good documentation could help you save time and nerves. PhpDocumentor is a good script that generates documentation for your code based on inline comments in your script files. It can generate various output formats, has different themes, and is very customizable. It only requires that you actually commend your code. You can read how to comment your code easily in the PhpDocumentor manual. There are a ...

Auto-install popular scripts. It’s magic!

Tuesday, March 27th, 2018 by Servage
Hey, have you ever wondered why so many free scripts are complicated to setup? Why don't they always work out of the box? Exactly! It's annoying! Many Servage users think that way, and I can only agree with you. And it doesn't have to be like that. With the Autoinstaller tool in your Servage account, you can install many of the most common open source scripts within seconds. It's as simple as pressing the mouse button. The need for an Autoinstaller Most open source scripts require somewhere in the area of a few to a lot of things to setup and customize, depending on your hosting account, before it works. This is often because the developers have made ...

Recent articles

Validation of EU VAT numbers

Companies that reside in the EU are obligated to check the validity of business customers' VAT numbers before engaging in intra-community tax-exempt transactions. For example if you are a British company providing an online service to a German company, you would need to validate the German company's VAT number in order to legally skip the VAT on the invoicing. Obvisouly it would make sense to du this programatically during your ...

How Many Websites Are There In The World?

According to the Netcraft  Web Server Survey  the number of websites grew within the the last four years from 861,379,152 to now 1,805,260,010 (plus 110%). The giant among the domain name extension is .COM (>82 million), followed by .DE (13 million), and .CN (12.55 million). The whole top ten can be viewed here . However, not all domains are active. According to estimations, about 75% of the existing domains are not connected to active websites. Such domains are ...

Servage Web Development Course Part 6: Protect your files and folders with htaccess

Hey there! Part five is now a few weeks old, and it's about time for the next step! Today the topic is simple file/folder protection with the help of htaccess (don't worry if you have no clue what that means). When you develop on a new project it's nice to be able to keep the public out, while working on it. And I am sure you can also come up ...

Servage Web Development Course Part 5: Forms

Welcome back to the development course. Now it's time to learn about forms. You may have noticed that forms are used all over the web to get user input. This happens in various ways, by entering information into text fields, select something from a drop-down box, chose among multiple options in buttons etc. The one thing that is valid for all of them, is that it is in some way or another a method of getting ...

Servage Web Development Course Part 4: Tables

Today we will take a look at tables. Tables are in general comparable with tables in for example Word or Excel, and should be used the same way in HTML. That basically means that tables are a way to represent tabular data. They are not meant to be abused for other purposes, such as for example layouts. It has been "normal" for many years to use tables for page structure, which has distorted the use ...