Servage Magazine

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

Archive for February, 2017

Building native-looking mobile apps with HTML and CSS

Thursday, February 23rd, 2017 by Servage
html-css-js-web-appHave you ever wished creating native Android or iOS applications were as easy as using HTML and CSS? Well, now it is! A CSS framework called Framework7 allows you to build web applications for phones that look almost identical to native mobile applications. If you enable full screen view in your phone’s web browser, chances are you don’t even notice the difference. Grid System One of the core features in every CSS framework is the grid system. It defines how many columns one row can have and what screen sizes they support. The grid in Framework7 is very similar to the grid of Bootstrap. All columns are placed inside a “row” class and ...

Synchronized Browser Testing with Browsersync

Sunday, February 19th, 2017 by Servage
browsersyncBrowsersync is a testing tool that makes it possible to test web applications using multiple browsers and devices at the same time. You control one browser, and everything you do is replicated on other connected devices. You can scroll, fill out forms, click links and do much more with Browsersync. This makes it much faster to test websites, and you will also notice rendering differences between browsers easier. Browsersync Explained in More Detail Browsersync is a NodeJS module that can be installed using NPM, the package manager for NodeJS. Having said that, NodeJS and NPM must be installed to use it. We will not be covering the installation of these two in this ...

Build an interactive feedback form with Javascript

Tuesday, February 14th, 2017 by Servage
javascript-codeListening to feedback of users is important. The tool we are going to explore this time is not a typical feedback form. Instead, it allows visitors to give feedback interactively. Users can highlight areas or elements on a web page they need help with, write a comment to describe their issue or question, black out sensitive information and finally, send the feedback or support request. Initial Setup and Requirements We will achieve the above features with a tool called Feedback tool by a GitHub user JoeyAndres. This tool was previously abandoned but JoeyAndres forked the project to create a maintained version, so thank him for being able to use it. The Feedback tool depends ...

Using Active Directory for LDAP Authentication in PHP

Wednesday, February 8th, 2017 by Servage
UnknownActive Directory (AD) is a tool you can often find in enterprises where it is used to authenticate and authorize users. It works as a single-sign-on service where only one user account is needed to sign in to multiple services. AD can be used to authenticate users for PHP applications as well. Active Directory is often considered difficult to understand or use, but soon you will see how easy it is to integrate it with websites. LDAP Functions Now here comes the easy part: authenticating users. Why is it easy? Well, because PHP comes with built-in functions called ldap_connect() and ldap_bind(), which are exactly what we need to authenticate users against Active Directory. ldap_connect() ...

Performing email-verification in PHP

Sunday, February 5th, 2017 by Servage
email-verificationEmail verification is a feature found on almost every website with a login system. Some PHP frameworks come with a built-in email verification, but in case you are using one that does not, you will have to use some other ready-made solution like a library or to build it from scratch. Building the system by yourself also gives you more freedom and flexibility to customize it for your needs. The Process Explained Here is how email verification often works in PHP applications: When a user signs up, their data, such as email address, password and name, are inserted into a database. Along with this data, a unique email verification token is stored in ...

How to scrape content from the web

Wednesday, February 1st, 2017 by Servage
imagesWeb scraping is a technique to extract data from a web page. The data can be text, images, hyperlinks or anything else found on websites. Today we will look into what web scraping is and why and in what situations it may be useful. We will also meet Gouette, a PHP web scraper library. How Web Scraping Works Web scraping starts by sending a GET request to a URL like a browser normally does when you visit a website. When the request is sent, the HTML response is saved so that it can be parsed and data can be extracted from it. When to do Scraping In desired situations, the website you want to get ...