http_redirect> <http_request_method_unregister
Last updated: Fri, 24 Feb 2012

http_request

(PECL pecl_http >= 1.0.0)

http_requestPerform custom request

Descrição

string http_request ( int $method , string $url [, string $body [, array $options [, array &$info ]]] )

Performs a custom HTTP request on the supplied url.

Veja a lista completa de opções da requisição.

Parâmetros

method

Request method

url

URL

body

Request body

options

opções da requisição

info

Informações de requisição/resposta

Valor Retornado

Retorna a(s) resposta(s) HTTP como uma string em caso de sucesso, ou FALSE em caso de falha.



User Contributed Notes
http_request
Dan
05-Jan-2012 09:28
You should specify the first argument (int $method) using one of the Predefined HTTP request method constants specified here:

http://www.php.net/manual/en/http.constants.php

For example:

<?php
http_request
(HTTP_METH_PUT, 'www.example.com');
?>
halfcountplus at intergate dot com
10-Jun-2010 03:11
method arg is a define, eg "POST"
You need to install pecl_http to use this.

http_redirect> <http_request_method_unregister
Last updated: Fri, 24 Feb 2012