Servage Magazine

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

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 ...

Validation of EU VAT numbers

Tuesday, March 20th, 2018 by Servage
eu_flagCompanies 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 order process, which is why the European VAT Number Validation API is ideal. The API allows you to validate any given EU VAT number directly from your code by using the following GET request URL - for example in PHP ...

How Many Websites Are There In The World?

Thursday, March 15th, 2018 by Helge
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 usually either parked or simply not active. Of course there are some giants out there which dominate the internet. Only to mention some: Yahoo was launched in 1997, the page Google was launched in 1998 and became soon the largest ...

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

Wednesday, March 14th, 2018 by Servage
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 with a whole lot of different reasons why you would want to protect certain files. What is htaccess protection? Htaccess files (hypertext access files) allow you to alter the configuration of the web-server to an extend permitted by the server administrator (which ...

Servage Web Development Course Part 5: Forms

Friday, March 9th, 2018 by Servage
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 information (input) from the user. In this part we will go through the basic form and input elements. The form itself The typical HTML form is enclosed by the <form> tag, which holds two important attributes, "method" and "action". The "method" attribute ...

Recent articles

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 ...

Google receives 2.4m requests to delete search results

Google received 2.4 million requests since 2014 to delete search-engine results under Europe’s “right to be forgotten” (RTBF) rules. European Union citizens currently have the right to ask search engines to remove results that include their names following a landmark decision from the European Court of Justice in 2014. The search giant released an updated version of its annual Transparency Report, which discloses how many and what kind of requests Google ...

Servage Web Development Course Part 3: Layout and page structure

Every website looks a little different, but somehow they all still contain similar elements. Like a menu, a content area, a top banner (called header) and a bottom (called footer). These can be arranged and displayed in varuous ways, but mostly they are all there - somehow. In HTML there is the <div> tag which is suited to define and seperate such areas from each other. Combined with CSS styling, these <div> containers, ...

Some info about the Servage control panel – directory listing

In case you want a web-directory to behave just like any other folder on your local PC, you'll need to enable directory listing in our Servage account. Please check further information regarding to this subject in our Wiki: https://www.servage.net/wiki/Directory_listing In case of questions, remarks, or webhosting  related questions, please get in touch with our support team via our support ticket system. If you  shouldn't have an Servage account  yet, please contact us via our 24/7 ...

Servage Web Development Course Part 2: Content formatting

In this part you will learn how to format (style) web pages' main content, such as text, paragraphs, lists, images and links. The formatting will be done with CSS, which was introduced in the first part of the Servage Web Development Course. Just to recap: HTML (Hypertext Markup Language) is the language used for the content of your website. CSS (Cascaded Style Sheet) is the language used to describe the design of your content. It is important ...