Top Banner
HTTP://PHP.net do clique ao resultado.
11

Protocolo http-php

Jul 30, 2015

Download

Documents

Michael Mafort
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Protocolo http-php

HTTP://PHP.net

do clique ao resultado.

Page 2: Protocolo http-php

Hypertext Transfer Protocol

É o protocolo responsável pela existencia da World Wide Web.

Page 3: Protocolo http-php

ProtocoloPadrões;

Tipos de requisições; ($_SERVER[‘REQUEST_METHOD’])

GET, HEAD, POST, PUT, DELETE, OPTIONS, CONNECT, TRACE

Códigos de respostas;1xx -> Código de informação (100)2xx -> Código de sucesso (200)3xx -> Redirecionamento (301)4xx -> Erro no cliente (404)5xx -> Erro no servidor (500)

Page 4: Protocolo http-php

Pra que?

Comunicação entre diferentes sistemas adotando o mesmo protocolo.Independe de linguagem;

Page 5: Protocolo http-php

Como funciona?

RequestProcessingResponse

Page 6: Protocolo http-php
Page 7: Protocolo http-php

Impacto da boa implementação

SEO;Tempo de resposta;Segurança;

Page 8: Protocolo http-php

Como com PHP?header();

header(‘Status: 404 Not Found’);

header(‘Location: /novo’, true, 301);

fopen(“php://stdin”, “r”); PUT, DELETE

$_SERVER

HTTP_ACCEPT_CHARSET, HTTP_ACCEPT_ENCODING

REMOTE_ADDR

Page 9: Protocolo http-php

Ajax

Asynchronous Javascript and XML

Quando e porque usar?

Sincrono ou Assincrono

XML ou JSON

Page 10: Protocolo http-php

Como melhorar grandes aplicações?

CDN (Content Delivery Network);

Varnish cache (Cache system);

Solr (Search engine);

Load Balancing;

SOA.

Page 11: Protocolo http-php

42

[email protected]

http://www.michaelmafort.com.br/blog

@michaelmafort