Server Side Scripting
PHP is a server side scripting language, which means that PHP is executed on the server and the result is sent to the browser in plain HTML. Server-side scripting is a technique used in web development which involves employing scripts on a web server which produce a response customised for each user's (client's) request to the website. The most popular server-side scripting languages and frameworks include PHP, ASP.NET, Node.js, Java, Ruby, Perl and Python. These scripts run on a web server and respond to client requests via HTTP to deliver dynamic and customized content to the user.
Server-side scripting is often used to provide a customized interface for the user. These scripts may assemble client characteristics for use in customizing the response based on those characteristics, the user's requirements, access rights, etc. Server-side scripting also enables the website owner to hide the source code that generates the interface.
Most server-side scripting environments support two approaches. One is to use some type of HTML template file with script code interspersed to generate variable data. The other is to use code to generate all HTML results.
Role of web server software
A web server is software and hardware that uses HTTP (Hypertext Transfer Protocol) and other protocols to respond to client requests made over the World Wide Web (WWW). The main job of a web server software is to display website content through storing, processing and delivering web pages to clients.
Web Servers
There are quite a few web servers available, like Apache, Microsoft IIS, Nginx Web Server, LightSpeed Web Server. But, the two most popular ones are-
- Apache HTTP Server:It is the most popular web server available and is widely used. It is developed and maintained by Apache Software Foundation. The Software is produced under the Apache License, which makes it free and open source. It is available for a variety of operating Systems- Windows, Mac OS X, Unix, Linux, Solaris, Novell Netware and FreeBSD.
- Microsoft Internet Information Service: Microsoft IIS (Internet Information Service) is the second most popularly used web server, and its market share is increasing quite rapidly with each passing day and is likely to overhaul Apache in the upcoming years. IIS server has all the features just like Apache, but it is not open source. It is developed, and maintained by Microsoft, thus it works with all the Windows operating system platforms.
A static web server, or stack, consists of a computer (hardware) with an HTTP server (software). We call it "static" because the server sends its hosted files as-is to your browser.
A dynamic web server consists of a static web server plus extra software, most commonly an application server and a database. We call it "dynamic" because the application server updates the hosted files before sending content to your browser via the HTTP server.
Functions of Web Server
- Stores and secures website data:
In web hosting services, a web server stores all website data and secures it from unauthorized users when it is properly configured. - Provides web database access:
A web server’s responsibility is to provide access to websites that are hosted. Web hosting service providers own some web servers that are used in variable ways to provide different web hosting services, such as backend database servers. - Serve the end user requests:
Web servers accept requests from different users connected over the internet and serve them accordingly. - Bandwidth controlling to regulate network traffic:
It is a feature available in web servers to minimize excess network traffic. Web Hosts can set bandwidth values to regulate the rate of data transmission over the internet. This feature avoids the down time caused by high web traffic. - Virtual hosting:
Virtual Hosting is a type of web hosting service in which a web server is used to host other software based virtual web-servers web sites, data, applications and other services. Virtualized Web servers do possess this feature to provide virtual hosting. - Server side web scripting:
This feature of the web server enables the user to create dynamic web pages. The popular server side scripting languages include Perl, Ruby, Python, PHPandASP etc