• 0

What is FTP? And what is used for?

FTP is the abbreviation of File Transfer Protocol which is a protocol from application layer of the TCP/IP networking protocol. FTP works on top of TCP layer to provide a standard and uniform way of exchanging files remotely.
ftp-connections

Because FTP works on top of TCP, it is connection oriented which means before file operation, a connection establishing is required and after completing the file operation a connection release is performed.

Differences from HTTP

Alike HTTP, FTP is composed from several text commands. HTTP instruction are done on a resource which can be static file, dynamic file or even virtual object. On the other side in the case of FTP, the commands are tightly related to a single file operation. For example there is instruction for file list, file upload, file download and so on. FTP is considered faster than HTTP in terms of file transfer because it is optimized for big files transfers and there is no much headers overhead comparing to HTTP.

Common FTP commands list

The following are list of the common FTP commands found in the standard FTP client.

Command Function
? or help Displays the help screen
open example.com opens an FTP connection to the host example.com. Presuming that there is FTP server listening to the standard FTP port number 22 at the host example.com
disconnect Disconnect
user send new user information
cd example change current directory to example
mkdir example create a new directory named example
rmdir example remove the directory named example, provided that it is empty (if it is not empty the command will fail)
pwd display current working directory
dir display the list of files and directories in the current directory
get myfile.html download the file myfile.html
send myfile.html or put myfile.html upload the file myfile.html from local machine to the remove host
rename myfile.html newname.html rename the file myfile.html to newname.html
append local.txt remote.txt append the contents of the local file local.txt to the remote file remote.txt
ascii switch to ASCII transfer mode
binary switch to binary transfer mode
delete myfile.html delete the file myfile.html from remote host
quit or bye exit FTP client

Anonymous FTP

Anonymous FTP is a feature or implementation of FTP server to allow any one to login into the FTP client with a public user name (any arbitrary email address) and with no password. Usually anonymous FTP is offered on public networks and universities to allow download of open source software using anonymous FTP.

ASCII mode vs BINARY mode

ASCII mode is a mode to allow transfer of readable roman letters text. With ASCII mode enabled the transfer of any binary or compressed files will just transfer a corrupted copy of the files. So the usage of this mode should be done with caution to make sure no binary files are transferred.
On the contrary a binary mode allows the transfer of binary files (i.e. executable files, images or zip files)

FTP PASV mode vs ACTIVE mode

ACTIVE MODE
Active modes is a transfer mode on which when a file transfer command requested by the client, the client should listen to a different non standard port and send the port number to the server in the request. Then the server will connect to this new port to start the data transfer. This method obviously will not work if the client machine is limited on ports or if there is a firewall on the client machine that prevent listening on non standard ports which is very common practice by security softwares. So as a resolution, PASSIVE mode was developed.
activeftp

PASSIVE MODE
On PASSIVE mode the FTP server will start listening on a non standard port after it receives a file transfer request from the client (provided that PASV mode is enabled) then it will send the port number to the client in the response to the transfer request. After that the client should connect to this new port numeber and the transfer begines.

passiveftp

Popular FTP clients

  • File Zilla: A windows based FTP client software that is open source.
  • FireFTP: A Firefox addon that is open source and free ware.

Popular FTP Servers

FTP Servers With GUI / Windows based

  • File Zilla: An open source FTP server software that works on windows.
  • WS FTP: Stands for WinSock File Transfer Protocol. It is non free windows based software.

Command Line Based FTP Servers / Linux based

  • vsftpd(Very Secure FTP Daemon): An open source software available on linux that support FTP and SFTP.
  • Pure-FTPd: Another open source software available on linux and BSD.

What is SFTP?

SFTP is a secure protocol which works on top of SSH protocol. It provides a similar sets of FTP commands but commands and data are encrypted preventing intruders from stealing sensitive data or password information. A FTP software alone can not interpolate with SFTP, it must support SFTP protocol explicitly to be able to connect to SSH server.

FTP alternatives

  • Web based file manager
    Some web hosting providers do not provide FTP access especially free hosting in this case there will be usually web based file manager provided which provide access to basic file operations like file upload, download, files list, delete, edit and some file managers provide some more advanced operations like file move, copy, zip extraction and zip creation. One of the popular file manager software is the one provided as a part of cPanel.
    file-mgr-layout

  • 0

301 Permanent Redirect vs. canonical

What is a 301 Permanent Redirect?

3012 Permanent Redirect is a response code by the browser which tell the browser that the requested page is moved and tell the new location to the browser. The browser reaction for such response is that automatically redirecting the user to the new location. Search engines will direct all the authority of the 301 redirects to the new location.
single-file-301-redirect

When to Use a 301 Permanent Redirect?

You need to use 301 permanent redirects if you have any of the following:-

  • Transferred your website to different domain/location
  • Moved or renamed a page and do not want to lose traffic coming to old location

How to make 301 Permanent Redirect?

There are many ways to make 301 permanent redirects. We will mention the most common ones.

Using .htaccess

By creating .htaccess file in the root directory of your website and entering the following text you will instruct the HTTP server to redirect users visiting oldpage.html to newpage.html

Using Server side language(i.e. PHP)

By writing the following code in the page oldpage.php you will instruct HTTP server to redirect visitors of oldpage.php to newpage.php

The rel=”canonical” Attribute

The rel=”canonical” attribute is not a redirect, rather it is an indication solely for search engines to tell them which page to index. Say if you have almost identical contents on two different locations using rel=”canonical” attribute will tell search engines which page of the two you want appearing in search engines. However according to google, the rel=”canonical” will be used as a direction or hint to choose the best page to index which means under some conditions google may choose to ignore rel=”canonical” attribute and index the other page which you do not want to index.

When to use Canonical?

  • When 301 can not be implemented (.htaccess is disabled or there is no server side language)
  • When you have duplicate contents but you want to keep both pages live

When to avoid using Canonical?

  • There is no much duplicated contents between the two pages
  • With paginated pages
  • With related but different pages

  • 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 0.0.0.0 until 255.255.255.255 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
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.
slicing

HTML And HTML5
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
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.

13_responsive_design_tutorials_css3_orientation_media_queries

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
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.NET
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
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
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
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
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)
entity-relationship-diagram

Check this tutorial to learn ER Diagram basics
SQL
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
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
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
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

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

hosting

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

regex-example

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

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.
http-request-response


  • 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 0.0.0.0 until 255.255.255.255 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

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

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

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.

javascript

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

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

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.
SQL-Server-2012-How-to-find-expiry-date-of-SQL-server-Expiry-Date


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