Similar presentations:
PHP. (Lesson 7)
1.
PHPLesson 7
2.
PHP HTTPParameters
Uniform Resource Identifiers (URI)
URI = "http:" "//" host [ ":" port ] [ abs_path
[ "?" query ]]
http://example.com/home?
view=some_view&cid=1
3.
PHP HTTP HeadMethod
Head same as GET, but only transfer the status
line and header section.
HEAD
GE
T
Request
Request
.
.
Respons
e.
Respons
e.
4.
PHP HTTP Headersget_headers
get_headers() returns an array with the headers sent by the
server in response to a HTTP request.
5.
PHP HTTP Headersheader()
The header() function sends a raw HTTP header to a client.
It is important to notice that header() must be called before any
actual output is sent.
header('Location: http://www.example.com/');
6.
PHP HTTP Headersheader()
Refresh page with php
header("Refresh: seconds")
Refresh page with meta
tags
<meta http-equiv="refresh" content="5">
Refresh page with
javascript
window.location.reload()
7.
PHP HTTP HeadersHeader Cache Control
8.
PHP URL Functionsparse_url()
Parse a URL and return its
components
urlencode()
URL-encodes string
urldecode()
Decodes URL-encoded
string
9.
Tasks1. Ստուգել user-ի կողմից մուտք արված url-ը standalone է, թե
ոչ: