Server-Based Web Programming (Part2) by firewall

View this thread on steempeak.com
· @firewall · (edited)
$1.16
Server-Based Web Programming (Part2)
I have shared before "Server-Based Web Programming". This is the second part.

<center><img src="https://steemit-production-imageproxy-thumbnail.s3.amazonaws.com/U5dqzciYHk2eUtB9n8dCpmxdKMbkti1_1680x8400"></center>

---

<h3>URL Analysis</h3>

All resources on the web are accessed through unique web addresses. These web addresses are called URL(Uniform ResourCE locator). The URL is simply a character string. It has a specific syntax for the correct interpretation of Web addresses in the Internet environment. The following is a sample URL and lists the meaning of each structure.

Shape of: scheme://domain:port/path?query_string#fragment_id.

**Schame:** Specifies the protocol the web address uses. For example, http, https, ftp, file, git etc.
**Domain:** This section of the web page or web resources to the server name or IP address (IPv4 or IPv6) determines.
**Port:** The port number used to connect to the server is specified in this area. If the port number is not specified, the default port number for the protocol in the schema field is understood. For example, if the protocol for http is used and the port number is not specified, 80 port is understood.


**Path:** Specifies the path to the web resource (web page or image, etc ...) on the server. When connected to the web server, there is the root directory defined in the server. Path refers to the file path relative to this root directory.
**Query_string:** Used to send data to server by GET method. The structure is like  key1 = value1 & key2_value2. The "&" character is placed between each parameter.
**Fragment_id:** Sets the placemarks created in the web page and called anchors. Also known as in-page link.



<center><img src="https://www.malware-traffic-analysis.net/2015/08/07/2015-08-05-traffic-analysis-exercise-answers-image-04.jpg"></center>

---

<h3> Client Server Communication </h3>

Interacting with the user on dynamic web pages is extremely important. Information from the user is retrieved with an HTML form and transmitted to the server. HTTP request methods are used when data is transmitting to the server. The most commonly used methods are:

**GET Method:**   This is the way to request data from a particular source. The request is sent via the URL. The parameter will be sent within the URL when the request is sent. GET requests can be stored in browser history and added as bookmarks to the scanner. Sensitive information is not sent with this method, because the URL also appears. The GET method has a size restriction due to its URL size.

**POST Method:**The method for sending data to the server for processing. The POST method does not remain in the browser history and cannot added as a bookmark. There is no size constraint.
There are also HTTP request methods used outside the GET and POST method. These are listed below.

<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/c/c9/Client-server-model.svg/1200px-Client-server-model.svg.png">

**HEAD method:** It has a similar function with the GET method. However, in the HEAD method, only the HEAD part of the web page (the document) is returned.
**PUT method:** The provided content is uploaded to the server. The POST method has similar functions.
**Delete method:** Deletes the specified resource.
**Option method:** Every server not supports this method. This method returns supported by the server.
**Connect method:** It configured convert custom TCP / IP tunnels.

---

<h3>Session Management in Dynamic Web Pages</h3>

When the user opens a page, the elapsed time is called a session until you close the page. In many web applications, HTTP requests are handled independently of each other. This feature is also known as "HTTP is STATELESS". The "Session" feature of dynamic web pages is used for data exchange between HTTP requests of a client. Session management is performed in two ways: a server-based session "SESSION" and a client-based session "COOKIE".

The server does not resemble each other with respect to each connecting client with **SESSION**, Session variables associated with the SESSION ID can be retainedThus each client is distinguished from one another and the server knows who the client is. A SESSION continues until the application shuts down and enables data transmission to each HTTP request. On this page, password protected pages are entered once and the authorization is retrieved and the other pages are navigated without entering password.


**COOKIE** is the information that is stored on the client with the client's request and is associated with the server. This information is visible to the client. There are certain time-outs. It is often used by the server to remember the preferences of the client later on. Storing sensitive information on the client side is a security drawback.


 In these sessions, HTTP requests are in PHP and the session variable maintains information during the session. When a web page is opened with a web browser, operations such as opening, modifying and closing are done. This information is then retained with the help of session variables.The session must be opened before the data for the session variable is used. 



<center><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/4/4f/Scheme_dynamic_page_en.svg/1015px-Scheme_dynamic_page_en.svg.png"></center>

---

<h3>Web Pages Execution</h3>
<h3> 1. Web Server</h3>
Web is a graphical service on the internet. We can define the application software running on an internete connected computer as a web server in order to transmit the prepared contents (graphic, text, sound, animation, image etc) to all users in the world and to access this file. Web server programs may vary depending on the operating system they are installed on. Computers using the Unix operating system as a Web server use Apache(Apache also has versions running on Windows operating systems.) while Windows operating system uses IIS(Internet Information Server) as the Web server program.
<h3> 2.Running ASP Pages</h3>
In order for ASP pages to be run on a PC without the need for an external server, staff Web Server (PWS) or Internet Information Server (IIS) must be installed on the products that Microsoft has developed. To install PWS at least Windows 95, and need at least Windows NT operating system to install IIS.
<h3>3.Running PHP Pages</h3>
In order for PHP pages to run, the Apache program must be installed on the computer on which the code is running. PHP pages to work on a PC without the need for an external server, the Apache Web server and PHP interpreter must be installed on that PC. In addition, the MySQL database server, which is fully compatible with PHP, must also be installed to accommodate database applications. Today, there are programs that keep all these programs together and work on the Windows platform(Wamp Server, Xampp, ZWamp, etc.).
<center><img src="https://www.safaribooksonline.com/library/view/php-mysql/9781449355517/httpatomoreillycomsourceoreillyimages1416279.png"></center>

---

<h3>Resources</h3>

<a href="https://www.w3schools.com/">[w3schools] </a>
<a href="http://www.webhostingtalk.com/">[webhostingtalk] </a>
<a href="http://www.phpbuilder.com/">[phpbuilder]</a>
<a href="https://www.safaribooksonline.com/library/view/php-mysql/9781449355517/ch01.html">[safaribooksonline/library]</a>
<a href="https://en.wikipedia.org/wiki/Dynamic_web_page">[wiki.Dynamic_web]</a>
<a href="http://www.webhostingtalk.com">[webhostingtalk]</a>

---
👍  , , , , , , , ,
properties (23)
post_id29,513,954
authorfirewall
permlinkserver-based-web-programming-part2
categoryseemstem
json_metadata"{"app": "steemit/0.1", "format": "markdown", "links": ["https://www.w3schools.com/", "http://www.webhostingtalk.com/", "http://www.phpbuilder.com/", "https://www.safaribooksonline.com/library/view/php-mysql/9781449355517/ch01.html", "https://en.wikipedia.org/wiki/Dynamic_web_page", "http://www.webhostingtalk.com"], "image": ["https://steemit-production-imageproxy-thumbnail.s3.amazonaws.com/U5dqzciYHk2eUtB9n8dCpmxdKMbkti1_1680x8400"], "tags": ["seemstem", "education", "tutorial", "science", "technology"]}"
created2018-01-31 20:37:36
last_update2018-01-31 21:01:57
depth0
children0
net_rshares186,667,474,933
last_payout2018-02-07 20:37:36
cashout_time1969-12-31 23:59:59
total_payout_value0.964 SBD
curator_payout_value0.192 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length7,480
author_reputation1,737,800,828,749
root_title"Server-Based Web Programming (Part2)"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (9)