SlideShare a Scribd company logo
PHP – Module 1 Hussain Fakhruddin [email_address]
Agenda HTML/XHTML and HTTP Basics Review PHP and the Web Server Architecture Model Overview of PHP Capabilities CGI vs. Shared Object Model
HTML/XHTML and HTTP Basics Review HTML/XHTML – a language that every browser knows. HTTP – a protocol that every machine uses to talk with others.
HTML – Hyper Text Markup Language Basically designed and used as a common language to retrieve documents from web. More features (called as tags) added later. Now is replaced by dynamic languages (like PHP) in some places. Tags are basically used to organize contents of document.
XHTML – eXtended HTML A strict format of HTML Each starting tag must have ending tag. There are strict rules to be followed. e.g. In HTML <br> is allowed, but in XHTML it must be <BR/> Similarly: HTML XHTML <p> <P/> <li>... <LI>......</LI>
Web Server Architecture Model Client server model. Like a query session after a lecture! Clients send request, server sends reply to the requested. Our web browser is typical client, which formats HTTP (or HTTPS etc.) request and sends to a server. A server (e.g. Apache on  www.sachinism.com ) formats response and sends back to the browser.
Working of Internet
A representation of client-server talk - 1 Client Server To Server, “Can you please give me index.htm?”
A representation of client-server talk - 2 Client Server To Client, “ Sure, here it is...” Contents of index.htm
A representation of client-server talk - 3 Client Server Wow... I am lucky to get index.htm so fast! Actual webpage,  that can be displayed on browser
HTTP – HyperText Transfer Protocol Protocol for talks between Client and server for Websites. Default Port no. 80 Simple, text based protocol Request – Reply model Stateless Two most frequently used methods (operations) – GET and POST
HTTP Format Request Format Request line (e.g. GET /images/logo.gif HTTP/1.1) Headers (e.g. Accept-Language: en) An optional message body
HTTP Request in details Request method – e.g. GET / POST / PUT URL – where to send the request HTTP version – e.g. 1.1 POST /my_dir/my_sub_dir/my_file.htm HTTP/1.1
Request methods -1 HEAD Request only headers for an GET request, not actual resource / data. Used to retrieve meta-data. GET Request actual resource. Used as a method to send data along with request. This data is shown on address bar of a browser! POST Request actual resource. Most common method used to send data to be processed by the resource. This data is not shown in address bar, is inserted in request body.
Request methods -2 PUT Uploads a resource. DELETE Removes / Delets a specified resource. TRACE Redisplays a request, to check if some server in midway to the destination has changed any value. OPTIONS Returns methods supported by the server's specific resource. Used to check server's functionality / support. CONNECT Converts the request connection to a transparent TCP/IP tunnel. Not much secure.
HTTP Format Response form Status line Headers An optional message body
HTTP Response Status Line HTTP Version Status code of 3 digits Status description
HTTP Response – Status details 200 OK Request successful 302 Moved Permanently URL is no longer used by server 404 Page not found Requested document / resource not found 500 Internal server error Some error on server
Request / Response Headers Exchange of information between client and server. Each line : Header name + value Classification of header lines: General header Request header Response header Entity header
General Header Can be present in both – request and response. Header Description Cache-control Information about caching Connection Connection should be either closed or kept  open. Date Current date
Request Header Specific to request messages. Header Description Accept Message format that is supported by  client Accept-language Language that client accept Host Host and port number of client If-modified-since Send the document if newer than  specified date If-unmodified-since Send the document if older than  specified date
Response Header Specific to response message Header Description Age Age of document Retry-after Date after which server is available Sever Sever name + port
Entity Header Mostly used in response message Header Description Content-encoding Encoding scheme Content-language Language Content-length Length Last-modified Last modification date and time Content-type Type of media document
HTTP Example Request GET http://www.sachinism.com/index.htm HTTP/1.0 Accept: text/html Accept: image/jpeg Response HTTP/1.0 200 OK Date: Thu, 20-Feb-08 09.00.00 GMT Server: Challenger MIME-version: 1.0 Content-length: 2048 << HTML Body >>
A representation of client-server talk - 1 Request GET http://www.sachinism.com/index.htm HTTP/1.0 Accept: text/html Accept: image/jpeg Client Server To Server, “Can you please give me index.htm?”
A representation of client-server talk - 2 Response HTTP/1.0 200 OK Date: Thu, 20-Feb-08 09.00.00 GMT Server: Challenger MIME-version: 1.0 Content-length: 2048 <<HTML  Body >> Client Server To Client, “ Sure, here it is...” Contents of index.htm
A representation of client-server talk - 3 Client Server Wow... I am lucky to get index.htm so fast! Actual webpage,  that can be displayed on browser
CGI - The Common Gateway Interface  CGI is a standard protocol for interfacing external application software with an information server, commonly a web server. an information server responds to requests(in the case of web servers, requests from client web browsers) Each time a request is received, the server analyzes what the request asks for, and returns the appropriate output.
 
CGI  The two simplest ways, for the server, of doing this are the following: 1) If the request identifies a file stored on disk, return the contents of that file; 2) If the request identifies an executable command and possibly arguments, run the command and return its output
 
PHP PHP Hyper Processor or Personal Hypertext Processor A server side programming language Emerged as leading language in server side application development since a decade! HTML can simply display data (static) whereas PHP can be executed on server and the result is displayed on client (Dynamic)  - will discuss later in this session
Why use PHP? 1)PHP is a server-side interpreter which is Open Source and free; 2)So is a growing number of PHP web applications; 3)PHP provides familiar syntax to C, Perl and Java developers; 4)PHP has fast connections to popular databases; 5)PHP has fast native connections to the Open Source MySQL database;
Why use PHP? 6)PHP runs reliably on Windows, Linux and Mac servers and clients; 7)PHP web pages run reliably on all the popular browsers; 8)PHP's associative arrays are very useful for UI and database apps; 9)PHP's object oriented classes are easy to understand; 10)PHP has been very promiscuous-linking to PDF, SWF, XML, Java, etc, etc.
Role of PHP - advantage Everything goes personalize I.E. User settings, look and feel, some private data etc. Provides user interactivity Allows to create own web applications that can be executed remotely! Examples : any website provides login and thereafter services, live cricket scores on sachinism.com
HTML/JS  VS PHP JavaScript = ClientSide; PHP = ServerSide With php you can have the remote time, with js you can have user time... with php the source is not lookable in the source code with js the source can be see in the source code of the page. Javascript NOT EQUAL TO PHP
Recap
Summary Internet era began with static webpages written in HTML, which required strict rules – created XHTML. Every web based application (essentially webpages / websites) are communicating on HTTP which follow specific format. User requests something to server and server sends back relevant data – implements client server architecture. Later on, server side programming languages like PHP adds user interactivity, personalisation of websites.
Whats next? Starting up with PHP Obtaining, Installing and Configuring PHP Obtaining PHP Source Code Installing PHP from Binary Packages Dynamic Extensions, Checking Install with  phpinfo() Function.

More Related Content

What's hot (20)

HTTP
HTTPHTTP
HTTP
vaibhavrai1993
 
Http methods
Http methodsHttp methods
Http methods
maamir farooq
 
Http
HttpHttp
Http
NITT, KAMK
 
Get and post methods
Get and post methodsGet and post methods
Get and post methods
baabtra.com - No. 1 supplier of quality freshers
 
HTTP
HTTPHTTP
HTTP
Daniel Kummer
 
Hypertex transfer protocol
Hypertex transfer protocolHypertex transfer protocol
Hypertex transfer protocol
wanangwa234
 
Hypertext transfer protocol (http)
Hypertext transfer protocol (http)Hypertext transfer protocol (http)
Hypertext transfer protocol (http)
johnny19910916
 
HTTP Protocol Basic
HTTP Protocol BasicHTTP Protocol Basic
HTTP Protocol Basic
Chuong Mai
 
Web technologies: HTTP
Web technologies: HTTPWeb technologies: HTTP
Web technologies: HTTP
Piero Fraternali
 
What's up with HTTP?
What's up with HTTP?What's up with HTTP?
What's up with HTTP?
Mark Nottingham
 
Introduction to HTTP - Hypertext Transfer Protocol
Introduction to HTTP - Hypertext Transfer ProtocolIntroduction to HTTP - Hypertext Transfer Protocol
Introduction to HTTP - Hypertext Transfer Protocol
Santiago Basulto
 
Hypertext Transfer Protocol
Hypertext Transfer ProtocolHypertext Transfer Protocol
Hypertext Transfer Protocol
Rajan Pandey
 
HTTP
HTTPHTTP
HTTP
altaykarakus
 
Lec 7(HTTP Protocol)
Lec 7(HTTP Protocol)Lec 7(HTTP Protocol)
Lec 7(HTTP Protocol)
maamir farooq
 
Http request and http response
Http request and http responseHttp request and http response
Http request and http response
Nuha Noor
 
Http request&response by Vignesh 15 MAR 2014
Http request&response by Vignesh 15 MAR 2014Http request&response by Vignesh 15 MAR 2014
Http request&response by Vignesh 15 MAR 2014
Navaneethan Naveen
 
Class 1 - World Wide Web Introduction
Class 1 - World Wide Web IntroductionClass 1 - World Wide Web Introduction
Class 1 - World Wide Web Introduction
Ahmed Swilam
 
Web server
Web serverWeb server
Web server
Nirav Daraniya
 
Http protocol
Http protocolHttp protocol
Http protocol
Arpita Naik
 
Hypertext Transfer Protocol
Hypertext Transfer ProtocolHypertext Transfer Protocol
Hypertext Transfer Protocol
Shubham Srivastava
 

Viewers also liked (11)

Php & web server performace
Php & web server performacePhp & web server performace
Php & web server performace
Tuyển Đoàn
 
Introduction to Web Architecture
Introduction to Web ArchitectureIntroduction to Web Architecture
Introduction to Web Architecture
Chamnap Chhorn
 
Displaying XML Documents Using CSS and XSL
Displaying XML Documents Using CSS and XSLDisplaying XML Documents Using CSS and XSL
Displaying XML Documents Using CSS and XSL
Bình Trọng Án
 
PHP Custom Web application development
PHP Custom Web application developmentPHP Custom Web application development
PHP Custom Web application development
Marion Welch
 
6 3 tier architecture php
6 3 tier architecture php6 3 tier architecture php
6 3 tier architecture php
cefour
 
Apache Web Server Architecture Chaitanya Kulkarni
Apache Web Server Architecture Chaitanya KulkarniApache Web Server Architecture Chaitanya Kulkarni
Apache Web Server Architecture Chaitanya Kulkarni
webhostingguy
 
PHP Summer Training Presentation
PHP Summer Training PresentationPHP Summer Training Presentation
PHP Summer Training Presentation
Nitesh Sharma
 
Php Ppt
Php PptPhp Ppt
Php Ppt
vsnmurthy
 
Introduction to PHP
Introduction to PHPIntroduction to PHP
Introduction to PHP
Bradley Holt
 
PHP Powerpoint -- Teach PHP with this
PHP Powerpoint -- Teach PHP with thisPHP Powerpoint -- Teach PHP with this
PHP Powerpoint -- Teach PHP with this
Ian Macali
 
Php Presentation
Php PresentationPhp Presentation
Php Presentation
Manish Bothra
 
Php & web server performace
Php & web server performacePhp & web server performace
Php & web server performace
Tuyển Đoàn
 
Introduction to Web Architecture
Introduction to Web ArchitectureIntroduction to Web Architecture
Introduction to Web Architecture
Chamnap Chhorn
 
Displaying XML Documents Using CSS and XSL
Displaying XML Documents Using CSS and XSLDisplaying XML Documents Using CSS and XSL
Displaying XML Documents Using CSS and XSL
Bình Trọng Án
 
PHP Custom Web application development
PHP Custom Web application developmentPHP Custom Web application development
PHP Custom Web application development
Marion Welch
 
6 3 tier architecture php
6 3 tier architecture php6 3 tier architecture php
6 3 tier architecture php
cefour
 
Apache Web Server Architecture Chaitanya Kulkarni
Apache Web Server Architecture Chaitanya KulkarniApache Web Server Architecture Chaitanya Kulkarni
Apache Web Server Architecture Chaitanya Kulkarni
webhostingguy
 
PHP Summer Training Presentation
PHP Summer Training PresentationPHP Summer Training Presentation
PHP Summer Training Presentation
Nitesh Sharma
 
Introduction to PHP
Introduction to PHPIntroduction to PHP
Introduction to PHP
Bradley Holt
 
PHP Powerpoint -- Teach PHP with this
PHP Powerpoint -- Teach PHP with thisPHP Powerpoint -- Teach PHP with this
PHP Powerpoint -- Teach PHP with this
Ian Macali
 
Ad

Similar to PHP Training: Module 1 (20)

Starting With Php
Starting With PhpStarting With Php
Starting With Php
Harit Kothari
 
computer network introduction. psc notes . Assisant professor in cse.
computer network introduction. psc notes . Assisant professor in cse.computer network introduction. psc notes . Assisant professor in cse.
computer network introduction. psc notes . Assisant professor in cse.
bushraphd2022
 
Www and http
Www and httpWww and http
Www and http
SanthiNivas
 
CNIT 129S - Ch 3: Web Application Technologies
CNIT 129S - Ch 3: Web Application TechnologiesCNIT 129S - Ch 3: Web Application Technologies
CNIT 129S - Ch 3: Web Application Technologies
Sam Bowne
 
Introduction to PHP.pptx
Introduction to PHP.pptxIntroduction to PHP.pptx
Introduction to PHP.pptx
MarianJRuben
 
CNIT 129S: Ch 3: Web Application Technologies
CNIT 129S: Ch 3: Web Application TechnologiesCNIT 129S: Ch 3: Web Application Technologies
CNIT 129S: Ch 3: Web Application Technologies
Sam Bowne
 
Web Services 2009
Web Services 2009Web Services 2009
Web Services 2009
Cathie101
 
Web Services 2009
Web Services 2009Web Services 2009
Web Services 2009
Cathie101
 
Unit v
Unit v Unit v
Unit v
APARNA P
 
Servlet & jsp
Servlet  &  jspServlet  &  jsp
Servlet & jsp
Subhasis Nayak
 
Ch 3: Web Application Technologies
Ch 3: Web Application TechnologiesCh 3: Web Application Technologies
Ch 3: Web Application Technologies
Sam Bowne
 
Configuring the Apache Web Server
Configuring the Apache Web ServerConfiguring the Apache Web Server
Configuring the Apache Web Server
webhostingguy
 
Webapp security testing
Webapp security testingWebapp security testing
Webapp security testing
Tomas Doran
 
Webapp security testing
Webapp security testingWebapp security testing
Webapp security testing
Tomas Doran
 
Web technology introduction to the web and its history
Web technology introduction to the web and its historyWeb technology introduction to the web and its history
Web technology introduction to the web and its history
BKReddy3
 
HTTP protocol and Streams Security
HTTP protocol and Streams SecurityHTTP protocol and Streams Security
HTTP protocol and Streams Security
Blueinfy Solutions
 
Web technology
Web technologyWeb technology
Web technology
Anuj Singh Rajput
 
Ch-1_.ppt
Ch-1_.pptCh-1_.ppt
Ch-1_.ppt
berihunmolla2
 
Chapter onehsfhjfgjhdjhdhfsGfhghsgasg (2).pptx
Chapter onehsfhjfgjhdjhdhfsGfhghsgasg (2).pptxChapter onehsfhjfgjhdjhdhfsGfhghsgasg (2).pptx
Chapter onehsfhjfgjhdjhdhfsGfhghsgasg (2).pptx
berihun18
 
Web Services Tutorial
Web Services TutorialWeb Services Tutorial
Web Services Tutorial
Lorna Mitchell
 
computer network introduction. psc notes . Assisant professor in cse.
computer network introduction. psc notes . Assisant professor in cse.computer network introduction. psc notes . Assisant professor in cse.
computer network introduction. psc notes . Assisant professor in cse.
bushraphd2022
 
CNIT 129S - Ch 3: Web Application Technologies
CNIT 129S - Ch 3: Web Application TechnologiesCNIT 129S - Ch 3: Web Application Technologies
CNIT 129S - Ch 3: Web Application Technologies
Sam Bowne
 
Introduction to PHP.pptx
Introduction to PHP.pptxIntroduction to PHP.pptx
Introduction to PHP.pptx
MarianJRuben
 
CNIT 129S: Ch 3: Web Application Technologies
CNIT 129S: Ch 3: Web Application TechnologiesCNIT 129S: Ch 3: Web Application Technologies
CNIT 129S: Ch 3: Web Application Technologies
Sam Bowne
 
Web Services 2009
Web Services 2009Web Services 2009
Web Services 2009
Cathie101
 
Web Services 2009
Web Services 2009Web Services 2009
Web Services 2009
Cathie101
 
Ch 3: Web Application Technologies
Ch 3: Web Application TechnologiesCh 3: Web Application Technologies
Ch 3: Web Application Technologies
Sam Bowne
 
Configuring the Apache Web Server
Configuring the Apache Web ServerConfiguring the Apache Web Server
Configuring the Apache Web Server
webhostingguy
 
Webapp security testing
Webapp security testingWebapp security testing
Webapp security testing
Tomas Doran
 
Webapp security testing
Webapp security testingWebapp security testing
Webapp security testing
Tomas Doran
 
Web technology introduction to the web and its history
Web technology introduction to the web and its historyWeb technology introduction to the web and its history
Web technology introduction to the web and its history
BKReddy3
 
HTTP protocol and Streams Security
HTTP protocol and Streams SecurityHTTP protocol and Streams Security
HTTP protocol and Streams Security
Blueinfy Solutions
 
Chapter onehsfhjfgjhdjhdhfsGfhghsgasg (2).pptx
Chapter onehsfhjfgjhdjhdhfsGfhghsgasg (2).pptxChapter onehsfhjfgjhdjhdhfsGfhghsgasg (2).pptx
Chapter onehsfhjfgjhdjhdhfsGfhghsgasg (2).pptx
berihun18
 
Ad

More from hussulinux (7)

Effective communication
Effective communicationEffective communication
Effective communication
hussulinux
 
Enterprise Application Framework
Enterprise Application FrameworkEnterprise Application Framework
Enterprise Application Framework
hussulinux
 
Direct Web Remoting : DWR
Direct Web Remoting : DWRDirect Web Remoting : DWR
Direct Web Remoting : DWR
hussulinux
 
Auto Forex Trade with Meta Trader 4
Auto Forex Trade with Meta Trader 4Auto Forex Trade with Meta Trader 4
Auto Forex Trade with Meta Trader 4
hussulinux
 
Apache Ant
Apache AntApache Ant
Apache Ant
hussulinux
 
Mobile Navigation
Mobile NavigationMobile Navigation
Mobile Navigation
hussulinux
 
Flash Widget Tutorial
Flash Widget TutorialFlash Widget Tutorial
Flash Widget Tutorial
hussulinux
 
Effective communication
Effective communicationEffective communication
Effective communication
hussulinux
 
Enterprise Application Framework
Enterprise Application FrameworkEnterprise Application Framework
Enterprise Application Framework
hussulinux
 
Direct Web Remoting : DWR
Direct Web Remoting : DWRDirect Web Remoting : DWR
Direct Web Remoting : DWR
hussulinux
 
Auto Forex Trade with Meta Trader 4
Auto Forex Trade with Meta Trader 4Auto Forex Trade with Meta Trader 4
Auto Forex Trade with Meta Trader 4
hussulinux
 
Mobile Navigation
Mobile NavigationMobile Navigation
Mobile Navigation
hussulinux
 
Flash Widget Tutorial
Flash Widget TutorialFlash Widget Tutorial
Flash Widget Tutorial
hussulinux
 

Recently uploaded (20)

No-Code Workflows for CAD & 3D Data: Scaling AI-Driven Infrastructure
No-Code Workflows for CAD & 3D Data: Scaling AI-Driven InfrastructureNo-Code Workflows for CAD & 3D Data: Scaling AI-Driven Infrastructure
No-Code Workflows for CAD & 3D Data: Scaling AI-Driven Infrastructure
Safe Software
 
ENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdf
ENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdfENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdf
ENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdf
Muhammad Rizwan Akram
 
Mastering AI Workflows with FME - Peak of Data & AI 2025
Mastering AI Workflows with FME - Peak of Data & AI 2025Mastering AI Workflows with FME - Peak of Data & AI 2025
Mastering AI Workflows with FME - Peak of Data & AI 2025
Safe Software
 
Oracle Cloud and AI Specialization Program
Oracle Cloud and AI Specialization ProgramOracle Cloud and AI Specialization Program
Oracle Cloud and AI Specialization Program
VICTOR MAESTRE RAMIREZ
 
“Addressing Evolving AI Model Challenges Through Memory and Storage,” a Prese...
“Addressing Evolving AI Model Challenges Through Memory and Storage,” a Prese...“Addressing Evolving AI Model Challenges Through Memory and Storage,” a Prese...
“Addressing Evolving AI Model Challenges Through Memory and Storage,” a Prese...
Edge AI and Vision Alliance
 
Your startup on AWS - How to architect and maintain a Lean and Mean account
Your startup on AWS - How to architect and maintain a Lean and Mean accountYour startup on AWS - How to architect and maintain a Lean and Mean account
Your startup on AWS - How to architect and maintain a Lean and Mean account
angelo60207
 
Kubernetes Security Act Now Before It’s Too Late
Kubernetes Security Act Now Before It’s Too LateKubernetes Security Act Now Before It’s Too Late
Kubernetes Security Act Now Before It’s Too Late
Michael Furman
 
Murdledescargadarkweb.pdfvolumen1 100 elementary
Murdledescargadarkweb.pdfvolumen1 100 elementaryMurdledescargadarkweb.pdfvolumen1 100 elementary
Murdledescargadarkweb.pdfvolumen1 100 elementary
JorgeSemperteguiMont
 
vertical-cnc-processing-centers-drillteq-v-200-en.pdf
vertical-cnc-processing-centers-drillteq-v-200-en.pdfvertical-cnc-processing-centers-drillteq-v-200-en.pdf
vertical-cnc-processing-centers-drillteq-v-200-en.pdf
AmirStern2
 
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Anish Kumar
 
Reducing Conflicts and Increasing Safety Along the Cycling Networks of East-F...
Reducing Conflicts and Increasing Safety Along the Cycling Networks of East-F...Reducing Conflicts and Increasing Safety Along the Cycling Networks of East-F...
Reducing Conflicts and Increasing Safety Along the Cycling Networks of East-F...
Safe Software
 
Bridging the divide: A conversation on tariffs today in the book industry - T...
Bridging the divide: A conversation on tariffs today in the book industry - T...Bridging the divide: A conversation on tariffs today in the book industry - T...
Bridging the divide: A conversation on tariffs today in the book industry - T...
BookNet Canada
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
FIDO Seminar: Targeting Trust: The Future of Identity in the Workforce.pptx
FIDO Seminar: Targeting Trust: The Future of Identity in the Workforce.pptxFIDO Seminar: Targeting Trust: The Future of Identity in the Workforce.pptx
FIDO Seminar: Targeting Trust: The Future of Identity in the Workforce.pptx
FIDO Alliance
 
Enabling BIM / GIS integrations with Other Systems with FME
Enabling BIM / GIS integrations with Other Systems with FMEEnabling BIM / GIS integrations with Other Systems with FME
Enabling BIM / GIS integrations with Other Systems with FME
Safe Software
 
Introduction to Typescript - GDG On Campus EUE
Introduction to Typescript - GDG On Campus EUEIntroduction to Typescript - GDG On Campus EUE
Introduction to Typescript - GDG On Campus EUE
Google Developer Group On Campus European Universities in Egypt
 
Artificial Intelligence in the Nonprofit Boardroom.pdf
Artificial Intelligence in the Nonprofit Boardroom.pdfArtificial Intelligence in the Nonprofit Boardroom.pdf
Artificial Intelligence in the Nonprofit Boardroom.pdf
OnBoard
 
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptxFIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Alliance
 
“Why It’s Critical to Have an Integrated Development Methodology for Edge AI,...
“Why It’s Critical to Have an Integrated Development Methodology for Edge AI,...“Why It’s Critical to Have an Integrated Development Methodology for Edge AI,...
“Why It’s Critical to Have an Integrated Development Methodology for Edge AI,...
Edge AI and Vision Alliance
 
Providing an OGC API Processes REST Interface for FME Flow
Providing an OGC API Processes REST Interface for FME FlowProviding an OGC API Processes REST Interface for FME Flow
Providing an OGC API Processes REST Interface for FME Flow
Safe Software
 
No-Code Workflows for CAD & 3D Data: Scaling AI-Driven Infrastructure
No-Code Workflows for CAD & 3D Data: Scaling AI-Driven InfrastructureNo-Code Workflows for CAD & 3D Data: Scaling AI-Driven Infrastructure
No-Code Workflows for CAD & 3D Data: Scaling AI-Driven Infrastructure
Safe Software
 
ENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdf
ENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdfENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdf
ENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdf
Muhammad Rizwan Akram
 
Mastering AI Workflows with FME - Peak of Data & AI 2025
Mastering AI Workflows with FME - Peak of Data & AI 2025Mastering AI Workflows with FME - Peak of Data & AI 2025
Mastering AI Workflows with FME - Peak of Data & AI 2025
Safe Software
 
Oracle Cloud and AI Specialization Program
Oracle Cloud and AI Specialization ProgramOracle Cloud and AI Specialization Program
Oracle Cloud and AI Specialization Program
VICTOR MAESTRE RAMIREZ
 
“Addressing Evolving AI Model Challenges Through Memory and Storage,” a Prese...
“Addressing Evolving AI Model Challenges Through Memory and Storage,” a Prese...“Addressing Evolving AI Model Challenges Through Memory and Storage,” a Prese...
“Addressing Evolving AI Model Challenges Through Memory and Storage,” a Prese...
Edge AI and Vision Alliance
 
Your startup on AWS - How to architect and maintain a Lean and Mean account
Your startup on AWS - How to architect and maintain a Lean and Mean accountYour startup on AWS - How to architect and maintain a Lean and Mean account
Your startup on AWS - How to architect and maintain a Lean and Mean account
angelo60207
 
Kubernetes Security Act Now Before It’s Too Late
Kubernetes Security Act Now Before It’s Too LateKubernetes Security Act Now Before It’s Too Late
Kubernetes Security Act Now Before It’s Too Late
Michael Furman
 
Murdledescargadarkweb.pdfvolumen1 100 elementary
Murdledescargadarkweb.pdfvolumen1 100 elementaryMurdledescargadarkweb.pdfvolumen1 100 elementary
Murdledescargadarkweb.pdfvolumen1 100 elementary
JorgeSemperteguiMont
 
vertical-cnc-processing-centers-drillteq-v-200-en.pdf
vertical-cnc-processing-centers-drillteq-v-200-en.pdfvertical-cnc-processing-centers-drillteq-v-200-en.pdf
vertical-cnc-processing-centers-drillteq-v-200-en.pdf
AmirStern2
 
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Anish Kumar
 
Reducing Conflicts and Increasing Safety Along the Cycling Networks of East-F...
Reducing Conflicts and Increasing Safety Along the Cycling Networks of East-F...Reducing Conflicts and Increasing Safety Along the Cycling Networks of East-F...
Reducing Conflicts and Increasing Safety Along the Cycling Networks of East-F...
Safe Software
 
Bridging the divide: A conversation on tariffs today in the book industry - T...
Bridging the divide: A conversation on tariffs today in the book industry - T...Bridging the divide: A conversation on tariffs today in the book industry - T...
Bridging the divide: A conversation on tariffs today in the book industry - T...
BookNet Canada
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
FIDO Seminar: Targeting Trust: The Future of Identity in the Workforce.pptx
FIDO Seminar: Targeting Trust: The Future of Identity in the Workforce.pptxFIDO Seminar: Targeting Trust: The Future of Identity in the Workforce.pptx
FIDO Seminar: Targeting Trust: The Future of Identity in the Workforce.pptx
FIDO Alliance
 
Enabling BIM / GIS integrations with Other Systems with FME
Enabling BIM / GIS integrations with Other Systems with FMEEnabling BIM / GIS integrations with Other Systems with FME
Enabling BIM / GIS integrations with Other Systems with FME
Safe Software
 
Artificial Intelligence in the Nonprofit Boardroom.pdf
Artificial Intelligence in the Nonprofit Boardroom.pdfArtificial Intelligence in the Nonprofit Boardroom.pdf
Artificial Intelligence in the Nonprofit Boardroom.pdf
OnBoard
 
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptxFIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Alliance
 
“Why It’s Critical to Have an Integrated Development Methodology for Edge AI,...
“Why It’s Critical to Have an Integrated Development Methodology for Edge AI,...“Why It’s Critical to Have an Integrated Development Methodology for Edge AI,...
“Why It’s Critical to Have an Integrated Development Methodology for Edge AI,...
Edge AI and Vision Alliance
 
Providing an OGC API Processes REST Interface for FME Flow
Providing an OGC API Processes REST Interface for FME FlowProviding an OGC API Processes REST Interface for FME Flow
Providing an OGC API Processes REST Interface for FME Flow
Safe Software
 

PHP Training: Module 1

  • 1. PHP – Module 1 Hussain Fakhruddin [email_address]
  • 2. Agenda HTML/XHTML and HTTP Basics Review PHP and the Web Server Architecture Model Overview of PHP Capabilities CGI vs. Shared Object Model
  • 3. HTML/XHTML and HTTP Basics Review HTML/XHTML – a language that every browser knows. HTTP – a protocol that every machine uses to talk with others.
  • 4. HTML – Hyper Text Markup Language Basically designed and used as a common language to retrieve documents from web. More features (called as tags) added later. Now is replaced by dynamic languages (like PHP) in some places. Tags are basically used to organize contents of document.
  • 5. XHTML – eXtended HTML A strict format of HTML Each starting tag must have ending tag. There are strict rules to be followed. e.g. In HTML <br> is allowed, but in XHTML it must be <BR/> Similarly: HTML XHTML <p> <P/> <li>... <LI>......</LI>
  • 6. Web Server Architecture Model Client server model. Like a query session after a lecture! Clients send request, server sends reply to the requested. Our web browser is typical client, which formats HTTP (or HTTPS etc.) request and sends to a server. A server (e.g. Apache on www.sachinism.com ) formats response and sends back to the browser.
  • 8. A representation of client-server talk - 1 Client Server To Server, “Can you please give me index.htm?”
  • 9. A representation of client-server talk - 2 Client Server To Client, “ Sure, here it is...” Contents of index.htm
  • 10. A representation of client-server talk - 3 Client Server Wow... I am lucky to get index.htm so fast! Actual webpage, that can be displayed on browser
  • 11. HTTP – HyperText Transfer Protocol Protocol for talks between Client and server for Websites. Default Port no. 80 Simple, text based protocol Request – Reply model Stateless Two most frequently used methods (operations) – GET and POST
  • 12. HTTP Format Request Format Request line (e.g. GET /images/logo.gif HTTP/1.1) Headers (e.g. Accept-Language: en) An optional message body
  • 13. HTTP Request in details Request method – e.g. GET / POST / PUT URL – where to send the request HTTP version – e.g. 1.1 POST /my_dir/my_sub_dir/my_file.htm HTTP/1.1
  • 14. Request methods -1 HEAD Request only headers for an GET request, not actual resource / data. Used to retrieve meta-data. GET Request actual resource. Used as a method to send data along with request. This data is shown on address bar of a browser! POST Request actual resource. Most common method used to send data to be processed by the resource. This data is not shown in address bar, is inserted in request body.
  • 15. Request methods -2 PUT Uploads a resource. DELETE Removes / Delets a specified resource. TRACE Redisplays a request, to check if some server in midway to the destination has changed any value. OPTIONS Returns methods supported by the server's specific resource. Used to check server's functionality / support. CONNECT Converts the request connection to a transparent TCP/IP tunnel. Not much secure.
  • 16. HTTP Format Response form Status line Headers An optional message body
  • 17. HTTP Response Status Line HTTP Version Status code of 3 digits Status description
  • 18. HTTP Response – Status details 200 OK Request successful 302 Moved Permanently URL is no longer used by server 404 Page not found Requested document / resource not found 500 Internal server error Some error on server
  • 19. Request / Response Headers Exchange of information between client and server. Each line : Header name + value Classification of header lines: General header Request header Response header Entity header
  • 20. General Header Can be present in both – request and response. Header Description Cache-control Information about caching Connection Connection should be either closed or kept open. Date Current date
  • 21. Request Header Specific to request messages. Header Description Accept Message format that is supported by client Accept-language Language that client accept Host Host and port number of client If-modified-since Send the document if newer than specified date If-unmodified-since Send the document if older than specified date
  • 22. Response Header Specific to response message Header Description Age Age of document Retry-after Date after which server is available Sever Sever name + port
  • 23. Entity Header Mostly used in response message Header Description Content-encoding Encoding scheme Content-language Language Content-length Length Last-modified Last modification date and time Content-type Type of media document
  • 24. HTTP Example Request GET http://www.sachinism.com/index.htm HTTP/1.0 Accept: text/html Accept: image/jpeg Response HTTP/1.0 200 OK Date: Thu, 20-Feb-08 09.00.00 GMT Server: Challenger MIME-version: 1.0 Content-length: 2048 << HTML Body >>
  • 25. A representation of client-server talk - 1 Request GET http://www.sachinism.com/index.htm HTTP/1.0 Accept: text/html Accept: image/jpeg Client Server To Server, “Can you please give me index.htm?”
  • 26. A representation of client-server talk - 2 Response HTTP/1.0 200 OK Date: Thu, 20-Feb-08 09.00.00 GMT Server: Challenger MIME-version: 1.0 Content-length: 2048 <<HTML Body >> Client Server To Client, “ Sure, here it is...” Contents of index.htm
  • 27. A representation of client-server talk - 3 Client Server Wow... I am lucky to get index.htm so fast! Actual webpage, that can be displayed on browser
  • 28. CGI - The Common Gateway Interface CGI is a standard protocol for interfacing external application software with an information server, commonly a web server. an information server responds to requests(in the case of web servers, requests from client web browsers) Each time a request is received, the server analyzes what the request asks for, and returns the appropriate output.
  • 29.  
  • 30. CGI The two simplest ways, for the server, of doing this are the following: 1) If the request identifies a file stored on disk, return the contents of that file; 2) If the request identifies an executable command and possibly arguments, run the command and return its output
  • 31.  
  • 32. PHP PHP Hyper Processor or Personal Hypertext Processor A server side programming language Emerged as leading language in server side application development since a decade! HTML can simply display data (static) whereas PHP can be executed on server and the result is displayed on client (Dynamic) - will discuss later in this session
  • 33. Why use PHP? 1)PHP is a server-side interpreter which is Open Source and free; 2)So is a growing number of PHP web applications; 3)PHP provides familiar syntax to C, Perl and Java developers; 4)PHP has fast connections to popular databases; 5)PHP has fast native connections to the Open Source MySQL database;
  • 34. Why use PHP? 6)PHP runs reliably on Windows, Linux and Mac servers and clients; 7)PHP web pages run reliably on all the popular browsers; 8)PHP's associative arrays are very useful for UI and database apps; 9)PHP's object oriented classes are easy to understand; 10)PHP has been very promiscuous-linking to PDF, SWF, XML, Java, etc, etc.
  • 35. Role of PHP - advantage Everything goes personalize I.E. User settings, look and feel, some private data etc. Provides user interactivity Allows to create own web applications that can be executed remotely! Examples : any website provides login and thereafter services, live cricket scores on sachinism.com
  • 36. HTML/JS VS PHP JavaScript = ClientSide; PHP = ServerSide With php you can have the remote time, with js you can have user time... with php the source is not lookable in the source code with js the source can be see in the source code of the page. Javascript NOT EQUAL TO PHP
  • 37. Recap
  • 38. Summary Internet era began with static webpages written in HTML, which required strict rules – created XHTML. Every web based application (essentially webpages / websites) are communicating on HTTP which follow specific format. User requests something to server and server sends back relevant data – implements client server architecture. Later on, server side programming languages like PHP adds user interactivity, personalisation of websites.
  • 39. Whats next? Starting up with PHP Obtaining, Installing and Configuring PHP Obtaining PHP Source Code Installing PHP from Binary Packages Dynamic Extensions, Checking Install with phpinfo() Function.