• 0

What I need to study to learn Web Programming?

To learn web programming and to build a fully working website and be able to manage it there are vast of skills that you need to have starting from server setup until coding the website and fixing problems when it comes up. This articles is not a programming tutorial but rather gives you a fast overview on the skills that you need to know and explanation on each skill to help you start.

Networking Background

First thing that you need to have is to get an idea about the overall image of a website. How it is available to all world? How it process a browser request? How it is displayed at web browser? How the dynamic contents are made? And so on.

TCP/IP package
TCP/IP package is the backbone of the internet. Internet it self is a huge group of computer machines connected together with routers. Both machines and routers support TCP/IP package and use it to communicate seamlessly. TCP/IP is a group of protocols that starts from physical signals exchanged between adjacent machines to high level layers protocol like HTTP which server HTML pages and FTP which server files.

IP Structure
IP is the abbreviation of Internet Protocol and it is a unique identifier that identify each machine connected and publicly accessible through internet. IP currently has two commonly used versions. First is IPv4 which consist from four segments divided by dot in between. Each segment is 8 bits in size or has range from 0 until 256 decimal. So the range of IPs starts from until giving a range of roughly 4 billions unique IPs.
Other popular version is IPv6 which is 128 bits and written in 8 segments divided by colon and each segment is 16 bits written in hexadecimal. i.e. FE80:0000:0000:0000:0202:B3FF:FE1E:8329

HTTP Protocol
HTTP protocol is the most top layer of TCP/IP protocol stack. It works on top of TCP layer which provides a connection oriented reliable bits streams. HTTP provide to the application using it a request/response scheme for transferring HTML pages and posting form requests. For more detail visit HTTP Protocol Article

Web Server
A web server is a service that runs on a machine connected to internet that processes requests via HTTP, the basic network protocol used to distribute information on the World Wide Web. Apache is the most famous web server on Linux environment while IIS (Internet Information Service) is the most famous web server on Windows environment. Other alternatives are nginx which runs on Linux and Apache Tomcat which supports JSP (Java Server Pages).

FTP Protocol
FTP is another application layer protocol similar to HTTP. The main difference is that FTP is tightly related to basic file operations. For example there is instruction to create directory, change directory, list files, upload file, download file and so on. For more info read the FTP protocol Article

Domains Structure And DNS
Domain names are a unique identifier to a website. It is considered the branding for this website. Each domain is composed from a domain extension and domain identifier i.e. example.com. Some domains has country extension as well i.e. example.us, example.co.uk. A domain itself is not a reachable address it is just a unique identifier, so to know the location of the machine to connect to an IP is required. IP can accessed by routers which support Internet Protocol. To lookup IP using domain name a registry and authoritative DNS server is required. A registry is virtually a huge list of domains and its authoritative DNS servers (In real it is not one list but hierarchical lists to achieve speed and optimized lookup). The browser connect to this registry first to get authoritative DNS servers. It then connect to the authoritative DNS to get a more local authoritative DNS until it gets the corresponding IP information for this domain.
There are several kinds of DNS information. For example A entry is for serving domain to IP lookup. MX record is for defining authoritative mail exchange server. NS for defining the authoritative DNS servers. And so on…
DNS servers work on top of TCP protocol.

SMTP Protocol
SMTP is the abbreviation for Server Mail Transfer Protocol. It is the protocol designed and optimized for mail exchange. Alike HTTP and FTP it is an application layer protocol with a set of commands to exchange e-mail message. The most popular open source SMTP servers are EXIM and Postfix they can be installed and run on Linux environment.

POP3 is the abbreviation of Post Office Protocol. It is the application layer protocol responsible for accessing mail box and downloading or deleting emails. On the contrary SMTP protocol is for e-mail sending or receiving. So SMTP and POP3 work together to have a complete email exchange/management function.

Socket Programming
A socket is an endpoint of a two-way communication link between two programs running on the network. Socket is bound to a port number so that the TCP layer can identify the application that data is destined.
Socket programming is a part of programming that take care of building a software that work on application layer. Mainly there are two types of connection to use TCP and UDP. TCP is the abbreviation of Transfer Control Protocol and it provided reliable connection oriented bits stream transfer. While UDP is the abbreviation of User Datagram Protocol, it providers a connectionless best effort bits stream connection. While TCP is best suited for files transfers, UDP is better used for video and audio streaming. Check Socket Programming tutorial in C

Graphic Design

While graphic design itself is not part of the web programming article but having a short background on what goes on there should be useful. Before the start of web design step, there is graphic design step. Mainly it is done using a graphic design software PhotoShop is ideal for this task. Then the design of full pages is built using layers on PhotoShop and saved as PSD file. Mostly you will not need to design your self but rather the task will be handled to a designer and all you need to know is that PSD file that you will get is composed from layers and is or can be sliced to create HTML out of it. However if you are into graphic design you can check this tutorial Photoshop Tutorials

Web Design

Web design is the process of converting a graphic design into a view-able HTML page. There are tools to do this like in PhotoShop there is slicing tool which is used to divide a single big page image into many slices of images.

HTML is the abbreviation of Hyper Text Markup Language. It is static language used for formatting text. Formatting here is not the design itself but it is a way to tell what the type of the contents. For example a button would be created using HTML. But button color width font and so on should be left to CSS to style it.
For more information about HTML visit What is HTML? Article. Check HTML5 Tutorial to learn how to write HTML(5).

CSS3 is the current version of CSS. It is the abbreviation of Cascading Style Sheets. It is considered the complementing part of HTML because it gives color, alignment, font, font size, spacing to the content marked up by HTML. For more information about CSS visit What is CSS? Article

Responsive Design
Responsive design is a new trend in design achieved by latest CSS3 supporting @media element which allows to restrict design to a certain device. A device can be PC, Tablet or Smart Phone. Using this conditioning element allowed serving different shape for each device using the exact same contents. From here the word responsive in responsive design came, it means a design that adapt to the device width, height and orientation to display in best fit for the device.


Server Side Web Programming

Server side programming means writing code that runs on server side and its output is then sent to the browser to display it. A visitor can not and should be able to view or access the source code but rather access its output. There are several languages to write server side code.

PHP is almost the most widely used server side programming language. Because it is easy to learn, fast and open source. On the contrary to Java, it can be function oriented or object oriented. For more information about PHP visit What is PHP? Article. To learn to program in PHP visit PHP Tutorial

ASP is the abbreviation is Active Server Pages. ASP it self is not programming language but rather a technology to run code written by a language supported by Microsoft .NET framework and send the output through HTTP protocol. The languages supported by ASP.NET are C# .NET or Visual Basic .NET . The server required to support ASP.NET is IIS (Internet Information Server) available in windows server package. Because it is part of Microsoft, the technology it self is not open source and considered having a property license.

JSP is the abbreviation of Java Server Pages. It is simply Java compiled pages (byte code) that run on server side and output it sent to the browser. There are several servers to run JSP available for example Apache Tomcat made by apache. Glassfish is another option.

Python is a widely used general purpose language however it can be served from web server as a server side language. Its design philosophy emphasizes code readability, and its syntax allows programmers to write code in fewer lines of code than would be possible in languages such as C++ or Java. The language provides constructs intended to enable clear programs on both a small and large scale.

Node.js is an open source, cross platform runtime environment for developing server-side web applications. Node.js applications are written in JavaScript and can be run within the Node.js runtime on OS X, Windows, Linux or FreeBSD. Its work is hosted and supported by the Node.js Foundation.

Template Engines
Template engines are tools to separate program logic and presentation into two independent parts. This makes the development of both logic and presentation easier, improves flexibility and eases modification and maintenance. The idea of templates engines came from the need to separate the design (the output of the server side language) from the program logic written by server side language. It is considered an early attempt to have a clear and separated code before the introduction of MVC.

MVC and Frameworks
Using template engines achieved the separation of programming logic from presentation (design) however there was another need to separate programming login from data abstraction because there are many different ways to store data. i.e files, memory or DBMS. moreover there are many DBMS available for example MySQL, Microsoft SQL, Oracle, Postgre SQL, MongoDB (No SQL) and so on. So to cover this need a MVC pattern design was invented. MVC is the abbreviation of Model View Controller. A Model is the data abstraction layer, Controller is the program logic and View is the presentation. To use MVC a server side programming language alone was insufficient so frameworks have been made. A Framework is a collection of libraries and tools which ease the RAD (Rapid Application Development) and provide base line for building MVC based applications.

CMS is the abbreviation of content management system. It is a computer software that allows publishing, editing and modifying content, deleting as well as maintenance from a web interface. It is another way for non programmer to be able to do programming tasks. Examples of the popular available CMS are Drupal and Joomla. WordPress is another example but mainly suited for blogging.

Database Understanding and SQL skills

A database is a collection of data that is organized so that it can easily be accessed, managed, updated and deleted. It comes as a solution for problems arose when data was being stored into files. There were trouble searching data in a speedy manner, and were trouble to remove the gaps arise after deleting data and so on. All those requirements and solutions to the trouble arose are collected together into a single system. This system is called Database Management System or DBMS for short.

Database Design
Real world database are not that simple, it is called relational database and easily can have tens or hundreds of tables that are related or linked together. So a robust database design is required to ensure there is no or least data redundancy, and ensure data integrity and security. Common database design diagram is called ER diagram (Entity Relationship)

Check this tutorial to learn ER Diagram basics
To access, manage update and delete data from a database, a language has been developed this language is called SQL (Structured Query Language). For more information about SQL visit What is SQL? Article. Check SQL Tutorial to learn how to write SQL queries.

MySQL is one of the popular DBMS available. It is mostly used with PHP in a LAMP environment (Linux Apache MySQL PHP). For more information about MySQL visit What is MySQL? Article

ORM is the abbreviation of Object Relational Mapping. In computer science it is a programming technique for converting data between incompatible type systems in object-oriented programming languages. This creates, in effect, a “virtual object database” that can be used from within the programming language. In many frameworks, ORM is builtin to provide support for virtual object database that as a result, one could migrate database over different DBMS without need to modify his code.

Client Side Web Programming

Last skill required to learn web programming is client side scripting. It means writing code that runs by the browser before or during rendering of the HTML page. The code mostly used to help in rendering the HTML page and/or load some other elements from web server using AJAX technology.

DOM is the abbreviation of the Document Object Model. It is a cross platform and language independent convention for representing and interacting with objects in HTML, XHTML, and XML documents. The nodes of every document are organized in a tree structure, called the DOM tree.

Javascript And jQuery
Javascript is nowadays not only the most common but the soley available and widely supported programming language. It is supported by all popular browsers like Google chrome, Firefox, IE, Opera and Safari. Javascript is object oriented language. For more information about JavaScript visit What is JavaScript? Article. Visit JavaScript Tutorial to learn JavaScript.
jQuery is a library built on JavaScript to help manipulate DOM (Document Object Model) in an easy way. check jQuery Tutorial to learn it in more detail.

AJAX Understanding
Ajax is a client-side script that communicates to and from a server/database without the need for a post back or a complete page refresh. The best definition I’ve read for Ajax is “the method of exchanging data with a server, and updating parts of a web page – without reloading the entire page.” Check AJAX Tutorial to learn how to write code that use AJAX

Twitter Bootstrap is the most popular HTML, CSS and JavaScript framework for developing responsive, mobile-first web sites. Check Bootstrap tutorial to learn how to use it

Congratulation on finishing the basic steps of learning web programming, check the advanced topics for learning web programming

  • 0

Free hosting vs. paid hosting

Category : Web Hosting

Hosting means renting some space on a server connected to the internet. There are many hosting companies available and some offer hosting for free. Here are the main differences between a hosting offered for free and the paid one.


  • Domain or subdomain

    While domain cost is paid usually apart from hosting, but with free hosting you may be not able to use your purchased domain name. This depends on the server settings. With free hosting you may be limited into using a subdomain of the ISP. ie. mywebsite.freehosting.com. A caution here is if you used a free hosting that only offer subdomain then if you decided to move you will lose your subdomain as well so it is not recommended option at all.
    With paid hosting the support to use domain is common and not only single domains but adding more domains also is mostly supported.

  • Dedicated IP or Shared IP

    Having a dedicated IP means that your website only use this IP and no other website share this IP with you. Having a shared IP means many other websites use the same IP that is allocated to your website. In this case a web server (i.e. Apache) decides which website to serve using the HOST header in HTTP request which should indicates the domain of the requested website.
    Many paid hosting offer a dedicated IP either by default or for a small additional fee some thing like $2 a month. On the other side free hosting will not offer a dedicated IP mostly simply because IP space is limited and it cost them money to have the IP.
    While it is ok to not to have a dedicated IP but having a dedicated IP will give more professional attitude to your website also you should take care if your website has a shared IP because any action done by the websites sharing the IP with you can affect your website for example if some website is sending emails that resulted on the IP get blocked will get your website blocked as well because it is using the same IP.

  • Available space and bandwidth

    A Free hosting will give you a very limited space and bandwidth mostly because they want you to upgrade to their paid package when you are in short in space or bandwidth. Some thing around 1GB space and 10 GB bandwidth is very commonly to be offered by free hosts. So you should keep this in mind or you could suffer having your website suspended when it use up all of the available space or bandwidth.

  • Over selling

    Over selling means a web host offers space and bandwidth it does not actually has. While both free hosting and paid hosting ISPs can be over selling but free hosting ISP has more tendency to over sell. First reason is that it is not making money from hosting your website so it tends to sell more and more websites with no real available space or bandwidth which could result on having down times or network overloading. Other reason is that they want you to move to paid package which offers better speed and less downtime.

  • .htaccess enabled or disabled

    .htaccess file is a file to modify access configurations for apache server for the directory a .htaccess file placed inside. With .htaccess you can prevent or allow hotlinking, add compression headers, place redirects, use mod_rewrite to rewrite requested URLS on the fly and much more… While it is very handy to use it but for free hosting allowing it can have some risk because it means any one can use a lot of features allowed by .htaccess so free hosts tends to have this feature turned off.

  • Shell Access

    With shell access you can almost control the server that you are accessing. Actually even paid hosting tends to have SSH turned off because it impose a security risk however some famous paid hosting providers offer some kind of jailed SSH which means a SSH but in a sandboxed environment so any operation will not affect other users.

  • Security and Safety

    A free hosting means many other unknown users share the same server with you which is not acceptable in terms of security. While the most ideally secure environment is having either a VPS or dedicated hosting but paid hosting especially that offer paid panels like cPanel or Plesk mostly have acceptable security measures like using SuExec and PHPSuExec in effect. With PHPSuExec an ISP will be able to ensures that each directory and file have the right permission and correct owner information (i.e. not world accessible). Also with PHPSuExec a server admin can identify the abusing users and suspend or remove them. Also having antivirus in effect is another important security measure which is not likely to be included in a free hosting package.

  • Is PHP, MySQL and Apache are up to date?

  • Having software up to date is important for both convenience and security. Paid hosting control panels like cPanels offers automatic update for all the important server software. Since in a free hosting it is unlikely to have a paid control panel moreover the ISP does not make money out of their hosting plans so they mostly will not care on keeping up with latest software updates.

  • Is IP Blocked?

    A free hosting usually suffers from all kinds of abuses like sending SPAM mails, running fishing software, running pirated websites etc… As a result there is high risk that many IPs of the free hosting will be blocked already by major ISPS and mail hosts.

  • Ads on your website

    There is a common method for ISPs offering free hosting to make money is by injecting ads into your website. In fact if your website gains popularity you will be losing a big portion of money because without the free hosting ads you can put your own ads and monetize your website.

  • Support

    A free hosting will have tones of users without big money flowing to the company so do not expect a good support when your web site is down or when you have some issue with it.

  • Automatic Backup

    Many paid hosting providers offers automatic backups to ensure their customers best possible data safety. On the contrary do not expect a free hosting provider to backup the data for you.

  • Downtime

    Currently 100% uptime becoming the quality standard however with free hosting with tones of free users do not expect this quality standard to be in effect. So if you decided to go with free hosting you should expect some downtime.

  • Durability

    A free hosting provider faces large amount of fake accounts and inactive users. To keep their user base fresh there should be some mechanism of removing inactive users. As a result do not expect your website to be up and running for long if it is not getting any traffic. Many free hosting providers set a condition of having certain amount of monthly visitors to keep your website up and running on their host.

  • 0

What is Regular Expressions?

Regular expressions is a technique or a language for telling a programming language or text editor how to parse a text. In a little bit more detail, it is used to represent a pattern using some special characters then this pattern is searched through given text and the matched text is extracted or undergone some operation i.e update, replace, delete.


Here are the most common regular expressions build blocks:-

Expression Meaning
[a-z] Any lower case alphabets
[A-Z] Any Camel Case alphabets
[0-9] or \d Any number
[^a] Match any character which is not a
\s Any space character
. Any character
* Means zero or more of the character before it
? Means zero or one of the character before it
+ Means one or more of the character before it
{2,4} Means from two to four occurrences of the character before it
{2,} Means two or more occurrences the character before it
{,4} Means four or less occurrences of the character before it
{3} Means exactly three occurrences of the character before it
\ Escape any special character. For example \. means a literal dot.
^ Match start of a string
$ Match end of a string

The expressions above can be combined to form a pattern that validates any pattern. i.e. email, zip code, telephone number or credit cards.

The regular expression for validating an e-mail:-

The regular expression for validating a url :-

The regular expression for validating a telephone number:-

The regular expression for validating a visa credit card number:-

The regular expression for validating a master card number:-

The regular expression for validating US zip codes:-

The regular expression for matching IP address:-

The regular expression for matching a date in the format dd/mm/yyyy:-

  • 0

Unmanaged Hosting VS Managed Hosting?

Category : Web Hosting

Shopping for a new hosting plan? Do you have to make the choice between managed hosting and unmanaged hosting.
Most of us use shared hosting where we do not come across the word “managed” at all. However if we are moving to a VPS or dedicated hosting the option to choose between managed and unmanaged will come up.

What is Unmanaged Hosting

Unmanaged hosting is a hosting plan with no or few additional services. With unmanaged hosting you may, for example, get simply a server with only an OS installed. This means that you’ll then need to install necessary software not nnly WordPress or Drupal but also Apache, MySQL and PHP

What is Managed Hosting

Managed hosting is a hosting plan that is made up of a number of various components beside the OS itself. Like cPanel or Plesk.
In addition, hosting companies also offer various services such as managing support, automated backups, malware scanning and removal, status monitoring, security sweeps, and more.

Key Differences Between Managed And Unmanaged Hosting

  • Price

    The price of a managed plan is much higher than of the same unmanaged one. However in case of unmanaged plan if you are stuck and you needed support you will have to pay hourly which will mostly surpass the saving you made by purchasing unmanaged hosting.

  • Support

    Unmanaged Hosting provide support only for H/W and OS problems including machine reboots and system reinstall. Any software installs, upgrades, configuration or backup should be done by you.
    On the other size managed hosting take care of almost every thing to get your website running including software installs, configurations, upgrades, backups and fixing pre-installed software.

What to choose unmanaged hosting or managed hosting?

Everyone is different so it is hard to give one fit answer for all people. Ask your self the following question to decide if unmanaged hosting or managed hosting is better for you.

  • Are you comfortable working with SSH?
  • Can you install and upgrade server software using SSH?
  • If some problem happened with your website. Are you able to trace access and error logs to identify the problem?
  • Is the price difference between managed and unmanaged hosting worth the time that you spend on unmanaged server?
  • Do you need a hosting control panel, such as cPanel or Plesk?

  • 0

What is HTTP? And what is it used for?

HTTP is the abbreviation for Hyper Text Transfer Protocol. Hyper Text means HTML pages. The protocol is one of the protocols included in the application layer of TCP/IP which works on top of TCP (Transmission Control Protocol) that provides a connection oriented reliable bytes stream connection. In easier way to say, HTTP works like there is already connection between source and destination that accepts text data. The protocol is composed from HTTP Request and HTTP Response each of them has certain keywords to distinguish type or request or response status.

Types of HTTP Requests

  • The first HTTP request type is GET request, its syntax is as following:-

    GET means a get request that is asks for a resource located at the server. The resource location in the example is /index.html which refers to the file index.html located at the root directory. Also index.html can be omitted and replaced with just /
    HTTP/1.0 is the protocol version used.

  • The second HTTP request type is POST request, its syntax is as following:-

    POST means a posting data to some script located at the server. The script location in the example is /path/to/script.php. The data posted is var1=value and var2=value2 here, two variable posted to the script. It is the responsibility of the script to fetch and interpret those values.
    HTTP/1.0 is the protocol version used.

  • The third HTTP request type is PUT Request:-

    From the example above, a PUT request is pretty much the same as POST request the main difference is that PUT request usually used to either create new resource or replace existing resource. While POST is historically used to create new resource only. Of course this is up to the handler script and not part of the protocol itself.

  • The last HTTP request type is DELETE request:-

    The server is requested to delete the indicated resource or move it to inaccessible location.

HTTP Response Codes

  • 200

    Means success or resource found.

  • 400

    Means the request is malformed or not supported by the server.

  • 401

    Means to access the required resource an authorization headers required.

  • 403

    Means the requested resource is forbidden. An authorization will not help.

  • 404

    Means the requested resource or file not found.

  • 500

    The server encountered a fatal condition which prevented it from responding to the request.

  • 301

    Means the requested resource moved to the indicated location permanently.

  • 302

    Means the requested resource moved to the indicated location temporarily

  • 304

    Means the requested resource found but has not been modified since last cached version.

Finally, the following figure depict a real HTTP request and response and shows some of the most commonly used headers.

  • 0

Why Dynamic IP is made?

Dynamic IP means dynamically assigning a new IP each time a machine is connected to the internet or to a router. Dynamic IP mechanism existent simply to be able to reuse the allocated IP with another machine when the connected machine is shutdown.

IPv4 and its limitation

IPv4 consists of 32 bits divided into four parts each part is 8 bits and is written in decimal form and all parts separated by a dot (.)

By simple calculations one would conclude that all combinations from until forms roughly 4 Billions of addresses. Looking at nowadays internet, there are many servers and users connected to the internet and usable address space is becoming overwhelmingly limited.

DHCP Servers

Due to this reason when a machine is disconnected from internet (user shutdowns his PC) there is a need to free up the allocated IP to use it with another machine.
This need is covered by dynamic IP allocation which means a machine will get a new IP each time it connects to the internet. The server responsible on this process is called DHCP Server (Dynamic Host Control Protocol) and it is available as a builtin software in all routers.


IPv6 is the new age of internet addresses. It is a huge address space with 128 bits divided into 8 parts each is 16 bits written into hexadecimal and separated by colons (:)

By simple calculations, this new space provides a range of up to 3 x 10 power 38 or three hundreds trillions trillions trillions addresses. It is said that with IPv6, there will be assignable address for each molecule on earth.

  • 0

What is HTML? What is CSS? What are JavaScript, PHP and MySQL?

What is HTML?

HTML is a static language for text formatting for web pages use. All web pages on the web consists of HTML which is sent to the browser for rendering. Browser interpret the HTML and convert it into colors, fonts and design. HTML is the abbreviation of Hyper Text Markup Language which means a language for writing text contents with non text contents i.e. list, table, alignment etc…
HTML mainly consists from TAGS with some contents inside. i.e. <p>Hello World</p> this tells the browser that there is a paragraph with the sentence “Hello World” inside. Similarly <img src=”http://path/to” /> tells the browser to display an image located at the url http://path/to
HTML has many versions starting from HTML 4.0 which issued at late 1997 until the most recent HTML5.
HTML5 has incorporated many new TAGS and supports a wide range of contents other than images like video and audio.

What is CSS?

CSS is the abbreviation of “Cascaded Style Sheets” and it is a coding method to let the browser knows the design of the HTML contents rendered. The word design here means colors, alignment, spacing, borders, backgrounds, font, width, height, etc… Because there is no code running here, CSS is considered a static language “Not a programming language”.

There are three different ways to embed a style sheet it can be either embedded into the tag, in a separate block in the page or in a separate file.
The syntax for embedding into a tag is as following:-

While the syntax for writing the style sheet into a separate block is just writing all styling enclosed into a style tag.

Last way of writing style sheets is by writing the styles into a separate file with the extension .css then adding the following tag into the head section.

The following image depicts a styling for h1 and body elements. With this style sheet any h1 in the web page will be colored white with orange background.

What is Javascript?

Javascript is a programming language that can be embedded or loaded alongside the web page. The code is downloaded and run by the browser. With javascript you can do any processing, do calculations or access cookies. However you can not access user data or files located on his PC. Also access to network is limited i.e. you can not run a server on the user machine.
With web being evolved to Web 2.0 more dynamic contents are incorporated into web pages. Starting from drop down menus, sliders, image galleries and more… Every thing here make use of javascript to provide the dynamics of the web page. Since both HTML and CSS are just static languages, here JavaScript comes into use. With Javascript you can load contents dynamically, do some calculations and change existing text and more…
Javascript alike CSS can either be embedded into the same page or included from external file.


What is PHP?

With javascript you can create dynamic contents, but it will lacks persistency and security. With javascript you can store data only in cookies which can be wiped out either when expired or by the user. Also cookies can be accessed by any application running on the user side which is considered insecure. So to store persistent data securely like user information another medium is required. Here PHP comes into play. PHP is one of many “Server Side” programming languages however it is the most popular one. A server side means the code run on the server side before sending the page contents to the user browser. With PHP you can run code that no one can access or inspect (Javascript code can be viewed or tempered by the user) because PHP code itself is not sent to the browser but it is run instead and its output is sent to the browser.

What is MySQL?

While you can use files to store your data but it is not good idea especially if you want functionalities like user search or reordering. Here a DBMS (Database Management Systems) comes into hand. With MySQL which is a freely distributed open source DBMS you can insert, update or query data using the standard SQL statements.

The following image is an example ER diagram which depicts a sample database with multiple tables liked together.

Check Database Explanation to know more info.

  • 0

What is MySQL? What is a Database? What is SQL?

What is MySQL

MySQL is free and open source Relational Database Management System (RDBMS) that uses Structured Query Language (SQL). MySQL was owned by Sun Micro Systems but currently owned by Oracle. It can be installed on the majority of available operating systems like Windows, CentOS, Ubuntu, Depian, etc…
With MySQL you can create and manage databases using SQL. MySQL is just one for many RDBMS available. Other examples are Microsoft SQL Server, Oracle and PostgreSQL. However MySQL is quite popular among web applications.

What is a Database

Database from its name means a center or base to store data in a structured way to be able to query and manipulate it in a speedy manner. Database consist of tables, tables is composed of columns and rows. Each row consist of fields corresponding to those columns. A database is mostly a relational database which means it is composed of tables related or linked together using “Primary keys” and “foreign keys”. Speaking in a little bit more detail, a primary key is a unique number (i.e. serial number) stored in a column in a table and optimized for high speed lookup. A foreign key is another number in a different table that each one of it matches a number from primary keys list mentioned earlier. This way a database engine can combine a table containing primary key and table containing foreign key by matching those keys together, which is called JOIN process. Speaking in terms on speed when correctly configured, a good database engine can combine a tables of millions of records in just a matter of few seconds.
relational database

What is SQL

SQL is a short for Structured Query Language which is according to ANSI (American National Standards Institute), it is the standard language for relational database management systems to to search, update, delete and insert data into a database in a highly optimized speed.

  • 0

How to start a website?

Category : Web Hosting , Webmastering

Here are the steps required to start a website from A to Z.

  1. Decide what you want to make:-

    There are overwhelming many types of sites that you can make. First it can be a business website or personal. Or it can be a blog or a website that contains articles. It may provide some service like hosting, domain registration. It can be a company portal. It can provide some kind of social networking similarly or integrated with facebook, twitter or instagram. And more and more …

  2. Decide how to make it:-

    First decide if you want it static (just a collection of HTML pages) or dynamic with a server side language like PHP, ASP, JSP, etc…
    If you choose to make a dynamic website you can either choose to use a CMS (Content Management System) to build your website or make it custom with or without a framework.
    Mostly using CMS will be best fit and will provide all of your “Content Management” needs with least cost and effort. There are many CMS available that suits different scopes and types of website. For example if you plan to run a blog then go with WordPress like this website, it is very easy and you can get your website running in few hours.
    If your website is a forum then go with phpBB it is free and open source and provide all of your forum needs.
    If your website is an online shop then go with osCommerce.
    If your website is more than a list of articles and will have a more complex functionalities then you can go far and use CMS like Drupal or Joomla. With Drupal or Joomla you can manage users and contents and have complex functionalities like search by features, user roles, custom contents and more. But bear in mind that with WordPress or PHPBB you can create your website your self easily but with Drupal and Joomla there is a probability that you will need to hire a technical person if you are not into the technical stuff because learning curve for Drupal or Joomla is longer than WordPress.
    There is the last option is to make your website without a CMS in this case you will need to have a programming skills or hire some persons who have. The most widely used language is PHP but you can choose JSP (Java server pages) or ASP (Active server pages) but bear in mind that each of them will require a different server and/or OS for example with PHP, it is mostly used with LAMP environment (Linux Apache MySQL and PHP). While with JSP you will need a server that supports JSP (i.e. Tomcat). Finally with ASP you will need a windows server with IIS working on it.

  3. Make the design or hire some one to make the design for you

    The design of your website is very important because a good design will create trust and guide visitors to take action. Also you have to keep in mind user friendliness because if users find it too hard to use your website they will just give up and stay away from your website. The design usually start with making PSD files using Photoshop then concerting them into HTML/CSS files.

    • If you are into design you can create the design your self using Photoshop or any other designing software.
    • If you are not into design there are alternative options like hiring some one to do the design for you.
    • Or, purchasing paid template.
    • Last resort is to use a free online template but keep in mind that other people also could be using the same template so your will lose uniqueness.


  4. Do the technical stuff

    If you are making a dynamic website then this is the step to transform your website from a static HTML pages into dynamic website. In this step you will need technical skills to make scripts that manipulate DB. If you choose to use an open source CMS like WordPress or Joomla then you will have to transform your HTML files into a theme or template loadable by the CMS. If you do not have technical skills to do this then either you can hire some one to do it for you or you can search for a supported theme from the start. Wordpess themes

  5. Register a domain

    Choose a meaningful yet reasonable short domain name is very essential for your business to work. The registration could from around $10 up to $30 a year.

  6. Rent a host

    This is the step to rent some online space to place your website on. Depending on your website size, expected traffic, required control you can choose either to go with shared hosting, VPS hosting or dedicated servers.

    • Shared Hosting

      Shared hosting provide you with the cheapest solution even there are some free packages available Free Hosting but it have bad side is that it your website will be hosted in a shared environment with other websites. You will have to make sure your website is not accessible by other users. Technically speaking, make sure your website have its owner and group name and no files with all access permissions (777) exception to that can be tmp or cache files. Other point to take care is the IP of your shared hosting, if you have a shared IP then your website will be sharing the IP with other websites check your website IP to make sure it is not blocked for SPAM or any other illegal stuff. Mochahost is a good and trustworthy shared hosting provider, consider trying it.

    • VPS Hosting

      If you do not like to go to the hassle of having your website in a shared environment then you can go with VPS hosting for a little extra money. VPS hosting hosting can start from as little as $7 a month up to $100 or more depending on the package that you choose. VPS Dime is a good VPS hosting company that provide a high RAM and space for a really cheap price. VPS Hosting

    • Dedicated Hosting

      Dedicated hosting gives you the most control and space for the price you pay however expect to pay at least $60 up to few hundred USD monthly. The packages can give you 500 GB space and around 4 GB RAM until several Tera bytes with as much as 32 GB of RAM. Just choose this option is your website is big enough and you expect high volume of traffic like several millions page view per month.

  7. Setup DNS

    DNS is short for “Domain name server” which means a server to lookup a domain name and return the corresponding IP. You will need this server to connect your domain name with the purchased hosting package or server. If you have choses shared hosting mostly this will be setup for you automatically however if you decided to go with VPS or dedicated hosting then you will need to make this your self. There are two options for you to use.

    1. Install and use a DNS server

      This option will give you most professional look because when someone lookup your domain DNS info. will find you have your own domain servers so but it requires many technical stuff and working through SSH which is out of scope of this article so unles you are going to run a hosting company it is advisable to use the next option. Note it you have ordered your VPS or dedicated server with control panel (i.e. cPanel) then the panel will provide you an easy way to configure your DNS server.

    2. Use free DNS Server

      This is the most trivial and easy solution to use. Many hosting providers offer free DNS also if you have purchased your domain name from GoDaddy they do offer a free DNS setup for your domain. Also they offer free e-mail package with the domain which is considered a complete domain solution to use.

  8. Upload your website

    After purchasing your web hosting package you will receive a SSH or FTP connection information just use any free FTP client software to login and upload your website. notice some free providers do not offer FTP and offer only web based file manager which is not advisable to use because you will have hard time if you decided to move from them.

    You can use FileZilla it is free FTP/SFTP client tool which is easy to use.


  9. Configure and Create DB

    This is the step where you will use either PHPMyAdmin if available or SSH to create and import your database. Also you will need to write connection configuration into the proper file in your website.

  10. Make sure your website is accessible and working as expected

    Now your website is online and should working, just make sure it is working as expected by doing overall test on your website functions like user registration, sending mails etc…

  11. Monetize your website

    If you like you can add ads. to your website so you can make money out of it. The best and most trustworthy ads network available is google adsense. You can register and create ads in few steps. Google Adsense

  12. Setup Analytics

    This is an optional step, where you will do it to track the traffic and progress of your website. Google provide an easy to use analytics and we recommend using it. Google analytics

  13. Do SEO and submit your website to Google and other search engines

    Although nowadays search engines will find your website without need to inform them explicitly but it is always better to do it your self also it will be a way to track the performance of your website at search and get free tips on imporoving your keywords and site contents. Below is a shot of google webmaster tools used to submit your website. You will need to verify your ownership of the domain name before accessing the webmaster tools features.

    Google webmaster tools

  14. Promote you website at social media

    Social media is very essential aspect of the nowadays internet and to ensure presence of your website on internet you must have presence at least on facebook, twitter instagram so create accounts and direct your site visitors on there.

  • 0

Cpanel vs. Plesk vs. kloxo vs. Webmin vs. DirectAdmin

Category : Web Hosting

If you do not know already Cpanel, Plesk, kloxo, Webmin and DirectAdmin are all control panels for managing websites and if you are hosting company you can either use Cpanel’s WHM or Kloxo to manage your clients, packages servers etc…
Here are comparison to know the main difference between the the most popular control panels and to choose the most one that suits your needs.

Control Panel Cpanel Plesk Kloxo Webmin DirectAdmin
License Proprietary License Proprietary License AGPL BSD style Proprietary License
Price $20/m for VPS or $45/m for server Starts from $4/m Free Free $29/m or $299 for life time
Last Release 2015 2014 2011 2015 2013
OS Linux Linux or Windows CentOS Linux / Windows (Partial support) Windows
Plugins Yes Yes No Yes Yes
Multi Servers Yes Yes Yes Yes Yes
Learning Curve Easy Medium Easy Medium Easy
Migration Support Yes Yes Yes Yes Supported per admin / reseller basis

Shots for different control panels:-

  • Cpanel

  • Plesk

  • Kloxo

  • Webmin
  • DirectAdmin

Show the Discount Codes for Leadpages
Chicago Dedicated Server
The Free Site! Only free samples, free stuff, freebies, free laptops, free gift cards, free beauty stuff