Fachgebiet Technische Informatik, Joachim Zumbrägel

Similar documents
COMPUTER NETWORKS AND COMMUNICATION PROTOCOLS. Web Access: HTTP Mehmet KORKMAZ

INTERNET ENGINEERING. HTTP Protocol. Sadegh Aliakbary

Global Servers. The new masters

Shankersinh Vaghela Bapu Institue of Technology

Notes beforehand... For more details: See the (online) presentation program.

Application Layer: The Web and HTTP Sec 2.2 Prof Lina Battestilli Fall 2017

CCNA Exploration Network Fundamentals. Chapter 3 Application Layer Functionality and Protocols

Chapter 10: Application Layer CCENT Routing and Switching Introduction to Networks v6.0

Application Layer -1- Network Tools

Objectives. Connecting with Computer Science 2

Programming the Web 06CS73 INTRODUCTION AND OVERVIEW. Dr. Kavi Mahesh, PESIT, Bangalore. Textbook: Programming the World Wide Web

COMPUTER NETWORK. Homework #1. Due Date: March 29, 2017 in class

2. Introduction to Internet Applications

The World Wide Web. Internet

Web Programming Paper Solution (Chapter wise)

ABT 294 Networking and the WWW

SC/CSE 3213 Winter Sebastian Magierowski York University CSE 3213, W13 L8: TCP/IP. Outline. Forwarding over network and data link layers

Computer Networks/DV2 Lab

M2-R4: INTERNET TECHNOLOGY AND WEB DESIGN

Application Level Protocols

Overview. Computer Network Lab, SS Security. Type of attacks. Firewalls. Protocols. Packet filter

CS 43: Computer Networks. Layering & HTTP September 7, 2018

Produced by. Mobile Application Development. Higher Diploma in Science in Computer Science. Eamonn de Leastar

Web Technology. COMP476 Networked Computer Systems. Hypertext and Hypermedia. Document Representation. Client-Server Paradigm.

The Nature of the Web

Data Communication & Computer Networks MCQ S

3. WWW and HTTP. Fig.3.1 Architecture of WWW

Web Engineering (CC 552)

Ethernet / TCP-IP - Training Suite Application level protocols

CCNA Exploration1 Chapter 3: Application Layer Functionality and Protocols

Uniform Resource Locators (URL)

Networks, WWW, HTTP. Web Technologies I. Zsolt Tóth. University of Miskolc. Zsolt Tóth (University of Miskolc) Networks, WWW, HTTP / 35

Contents 1 INTRODUCTION TO COMPUTER NETWORKS...

Motivation For Networking. Information access Interaction among cooperative application programs Resource sharing

COSC 2206 Internet Tools. The HTTP Protocol

Chapter 4: Networking and the Internet

Chapter 2. Application Layer

Computer Networks. Wenzhong Li. Nanjing University

1.1 A Brief Intro to the Internet

Web Development. Lab. Bases de Dados e Aplicações Web MIEIC, FEUP 10/11. Sérgio Nunes

CREATING WEBSITES. What you need to build a website Part One The Basics. Chas Large. Welcome one and all

CCNA Exploration Network Fundamentals. Chapter 03 Application Functionality and Protocols

"The Internet. All the piracy and none of the scurvy." -- Anonymous

Introduction to Computer Science. William Hsu Department of Computer Science and Engineering National Taiwan Ocean University

P2_L12 Web Security Page 1

Unraveling the Mysteries of J2EE Web Application Communications

Set of IP routers. Set of IP routers. Set of IP routers. Set of IP routers

How the Web Works. Chapter 1. Modified by Marissa Schmidt Pearson

Jianhui Zhang, Ph.D., Associate Prof. College of Computer Science and Technology, Hangzhou Dianzi Univ.

Time: 3 hours. Full Marks: 70. The figures in the margin indicate full marks. Answer from all the Groups as directed. Group A.

Introduction to Web Technologies

WWW: the http protocol

CSCU9B2 Practical 1: Introduction to HTML 5

The PHP language. Teaching you everything about PHP? Not exactly Goal: teach you how to interact with a database via web

1.1 A Brief Intro to the Internet

World Wide Web. Before WWW

WEB TECHNOLOGIES CHAPTER 1

1.1 A Brief Intro to the Internet

CMSC 332 Computer Networking Web and FTP

Internet Applications. Dr Steve Gordon ICT, SIIT

Chapter 4: Networking and the Internet. Copyright 2015 Pearson Education, Inc.

Information Network Systems The application layer. Stephan Sigg

How to Create a NetBeans PHP Project

TCP/IP Networking Basics

CNIT 129S: Securing Web Applications. Ch 3: Web Application Technologies

System Programming. Introduction to computer networks

Introduction. Server-side Techniques. Introduction. 2 modes in the PHP processor:

Computer Networks. More on Standards & Protocols Quality of Service. Week 10. College of Information Science and Engineering Ritsumeikan University

Chapter 7:- PHP. Compiled By:- Sanjay Patel Assistant Professor, SVBIT.

World Wide Web. Hypertext

Introduction to Programming

Lecture 04: Application Layer (Part 01) Principles and the World Wide Web (HTTP) Dr. Anis Koubaa

CS WEB TECHNOLOGY

Information Network I: The Application Layer. Doudou Fall Internet Engineering Laboratory Nara Institute of Science and Technique

Connecting with Computer Science Chapter 5 Review: Chapter Summary:

EEC-682/782 Computer Networks I

Network Communications Standards. Applied Information Technology

Announcements. 1. Class webpage: Have you been reading the announcements? Lecture slides and coding examples will be posted

EITF25 Internet- - Techniques and Applica8ons Stefan Höst. L9 Applica8on layer

From administrivia to what really matters

SCS3004 Networking Technologies Application Layer Protocols

Review of Previous Lecture

CN Assignment I. 1. With an example explain how cookies are used in e-commerce application to improve the performance.

Protocols. Networking CS 3470, Section 1 Sarah Diesburg

How A Website Works. - Shobha

Internet applications

The CartIt Commerce System Installation Guide

EECS 3214: Computer Network Protocols and Applications

Lecture Overview. IN5290 Ethical Hacking. Lecture 4: Web hacking 1, Client side bypass, Tampering data, Brute-forcing

Application Protocols and HTTP

= a hypertext system which is accessible via internet

APPLICATION LAYER APPLICATION LAYER : DNS, HTTP, , SMTP, Telnet, FTP, Security-PGP-SSH.

CS 43: Computer Networks. HTTP September 10, 2018

Lecture 12. PHP. cp476 PHP

Crystal Enterprise. Overview. Contents. Web Server Overview - Internet Information System (IIS)

DESCRIPTION OF TYPICAL NETWORK SERVICES ON SERVERS

Chapter 2: outline. 2.6 P2P applications 2.7 socket programming with UDP and TCP

Scan Report Executive Summary. Part 2. Component Compliance Summary Component (IP Address, domain, etc.):ekk.worldtravelink.com

Networking. Layered Model. DoD Model. Application Layer. ISO/OSI Model

Mac OS X Server Web Technologies Administration. For Version 10.3 or Later

Transcription:

Computer Network Lab 2017 Fachgebiet Technische Informatik, Joachim Zumbrägel Overview Internet Internet Protocols Fundamentals about HTTP Communication HTTP-Server, mode of operation Static/Dynamic Webpages HTML PHP programming 1

Internet Server Internet Data: Text, Audio, Video, Graphics,etc Connection via TCP/IP-Protocol Client History The WWW is 26 years old On the 30 th April 1993 Tim Berners-Lee declared: Everyone is allowed to use the WWW and all possibilities it offers without any licenses. A good idea. 2

Internet Services E-Mail WWW Chat Internet News FTP ssh/telnet Cloud Applications Internet Protocols HTTP HTTPS FTP SMTP NNTP. Data Server Client Internet Connection via Internet Protocol 3

Protocols Application HTTP FTP SMTP DNS SNMP RIP Transport TCP UDP Internet IP Phys. Network Ethernet Token-Ring ATM HTTP (Hyper Text Transfer Protocol) Two Types of messages: Request, Response Requests: Request method i.e.: Get, Post wanted URL HTTP-Protocol version (actual 1.1) Headerinfo i.e.: which documents could be received by the client Responses: Status messages i.e.: 200 : OK, 404: File Not Found Headerinfo i.e.: Content-Length, Content-Type (Text, Html, etc.) The requested document 4

HTTP (interactions) HTTP Interaction Principles : Connection establishment TCP-Connection from Client to Server (usually Port 80 on the Server) Request from Client to Server Method selection and additional parameters for the method Response from Server to Client Result as a status code additional parameters for the result Connection termination usually ending the connection newer versions (newer then HTTP/1.1) can keep connection longer alive HTTP (Request Methods) OPTIONS requests server features GET fetch a resource from server HEAD provides only meta information about a resource PUT saves a resource POST sends a data set to a resource DELETE deletes a resource TRACE allows tracking of the processing of requests 5

HTTPS (1) Widely used security technology http-server accepts ssl (secure socket-layer) connection Identification of secure connection via https://url SSL connection uses port 443 Transmitted data are quasi tap-proof (key length) Higher working load on server, because encryption causes additional computing time HTTPS (2) Application HTTPS Security SSL Transport TCP Internet IP Phys. Network Ethernet Token Ring ATM 6

Client Server Principle Client with Webbrowser Request over http request Webserver TCP/IP Results http answer IP-Adresse TCP/IP HTTP Network URL URL = unified resource locator The access to the server is done by the URL Format: access_method://computerername:port/document?querystring Example: http://www.uni-due.de/netlab/student.php?matr=123456 access method: http computer name: www.uni-due.de port: standard port (80 for HTTP), here not specified document: netlab/students.php(path/filename) Query string: matr=123456 7

Domain Names Domain name: ti.uni-due.de de: first layer name (top-level-domain) uni-due: second layer name ti: third layer name de uni-due.de ti.uni-due.de IP-Addresses and Ports TCP/IP operates by IP-Addresses and Ports each IP-Adresse has 2 16 potential ports The ports below 1024 are standardized (standard ports), which are allocated to dedicated services, i.e.: 23 telnet 25 smtp 80 http 443 https 23 25 80 443....... 30000. 8

Query GET/POST Data transfer to server Data are computed by the server and the resulted page is sent to the client Two procedures: Get and Post method Get: Query-String is specified within the url http://www.uni-duisburg.de/student.php?name=peter Post: Data are transmitted in HTTP query s body (not in url) Example: form data HTTP-Server (1) Document Root Folder root directory where all files for the website are stored Documents are organized in directories Access rights are considered like: read, write, delete public accessed web pages have to be readable by everyone, in terms of access rights Definition of standard documents like index.html, start.htm Modular structured, additional services like php-modul can be integrated Multiple configurations i.e. - directory level control - allow access only from specific IP-Addresses 9

HTTP-Server (2) Apache-Server configuration is done using the file httpd.conf. This file is read in and evaluated when starting the server. Contains information about the Apache Web-Server itself, about logs and additional configuration files. Examples: ServerRoot The statement ServerRoot defines the path to the top level directory, which includes configuration folders and files, log-files and documents. DocumentRoot The document folder is the directory, where the server tries to locate the file, in case no path was specified within the url. Only one DocumentRoot can be defined in the resource list of the Apache Web-Servers. UserDir UserDir makes it possible for the web-server to access documents out of the user s home directory. Example: http:/server/~username/document.htm HTTP-Server (3) 10

Static Internet Pages Pages (content) are already available before they are requested Pages are quickly available The Server does not need any additional services (applications) like: Interpreter, Database. Interaction with Server is limited to links Pages can be computed, respectively displayed, on the client computer, without any additional procedures HTML (Hypertext Markup Language) Markup language: it describes the logical part of a text oriented document. HTML offers the possibility to define typical elements of a text, like: headers, paragraphs, lists, tables, Advantages: HTML is a so called clear text format (can be edited with every text editor) Easy to learn Disadvantages: No separation between form and content Design and Interaction possibilities are limited 11

HTML (2) <html> <head> <title>beispiel </title> </head> <body> Textfeld<br> </body> </html> Browser Dynamic Internet Page (server 1) Page content is generated (immediately) after request Access may be slower, due to the need of page generation System has to have adequate resources Optional applications possible Database access Graphics generation Access of processes (application), which offer interfaces General 2 methods GGI (Common Gateway Interface) i.e.: perl, c++ As a modul (server extension) i.e.: php 12

Dynamic Internet Page (server 2) Client Request PHP Modul DB Generated HTML-File Generated HTML-File Dynamic Internet Page (client) DHTML Browser can execute (interpret) scripts, which are included in HTML-Files. By the use of a script language a dynamic page can be created on the client. Example: JavaScript (Browser independent) JavaScript is interpreted by the web browser at runtime. Therefore modern web browser have an interpreter software integrated. Example 13

Sessions (1) HTTP is a stateless protocol After the request (and response) for a web page the connection between client and server is terminated Server do not have a history list or anything similar, which means that two consecutive requests from the same client are treated as two different independent requests How is this problem solved? i.e. online shops Sessions (2) Implementation of a mechanism, which generates (on the server) an unique session-id at the first request. It will be sent with each further client request to the server. Session ID is transmitted Within the URL, which means each link, used within a session, includes the session-id With use of cookies max 4 KB text files, which are initiated by the server and sent to the client. They can be used by the client on demand. 14

PHP PHP is an interpreter language Platform independent (Windows/UNIX) Easy Syntax (C-similar) Easy to integrate in http-servers (Apache, IIS) Powerful functions (database access, etc.) Free Software (no license costs) Frequently used (as well by public providers) A lot of ready-to-use modules (forum, samples) HP POP: Comments Comments in PHP are characterized as follows: By the symbol # or // Denotes the following text, until the end of the line as a comment. by /* */ Hereby the enclosed text is denoted as a comment. 15

PHP: Variables PHP uses an automatic data type conversion (i.e. integer to string, etc.). Definition: Variables $variable_name= value Arrays $Array_name = array {value1, value2,, valuen} PHP: Control Structures IF (condition) { # instructions, if condition is true } ELSEIF (further conditions) { # instructions, if the first condition was false and this condition is true } ELSE { # instructions, if all conditions are false } 16

PHP: Loops WHILE-loop WHILE (condition) { # instructions, execute while condition is true } FOR-loop FOR (start value; condition; instruction) { # instructions } PHP:Functions FUNCTION function_name (variables as parameters) { # instructions # optional: RETURN (return value); } 17

PHP: Text String concatenation via. Output (TEXT) generation with PHP using the command print or echo Example: $str1 = Hello ; $str2 = Students ; $str1and2 = $str1.$str2; echo($str1and2.<br>); print ($str1and2. are you fine? ); Output visible in your browser => Hello Students Hello Students are you fine? PHP: File operations Open file for writing Save data in file Read data from file Important: adequate file permissions are required!!! Example for reading the content of a file, each line of the file is stored in a separate array field: $filedata = file ( filename ); 18

PHP: hand over data Remember, you can send data from the browser to the server via 2 different methods in http: post or get The array $HTTP_POST_VARS contains all the variables handed over via POST method. i.e.: from a form via POST. The Array $HTTP_GET_VARS contains all the variables handed over via GET method. i.e.: from a form via GET. Example PHP: Example Source-Code of the example 19

Links PHP developers homepage http://www.php.net selfhtml: Excellent document (tutorial) about HTML and more http://www.selfhtml.org/ 20