downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

http_redirect> <http_request_method_unregister
[edit] Last updated: Fri, 17 May 2013

view this page in

http_request

(PECL pecl_http >= 1.0.0)

http_requestPerform custom request

Descrizione

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

Performs a custom HTTP request on the supplied url.

Vedere l'intera lista di opzioni della request.

Elenco dei parametri

method

Request method

url

URL

body

Request body

options

opzioni della request

info

informazioni su Request/response

Valori restituiti

Restituisce la response HTTP come una stringa in caso di successo, oppure FALSE.



add a note add a note User Contributed Notes http_request - [2 notes]
up
1
Dan
1 year ago
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');
?>
up
-1
halfcountplus at intergate dot com
2 years ago
method arg is a define, eg "POST"
You need to install pecl_http to use this.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites