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

search for in the

http_redirect> <http_request_method_unregister
[edit] Last updated: Fri, 18 Sep 2009

view this page in

http_request

(PECL pecl_http >= 1.0.0)

http_requestPerform custom request

Описание

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

Performs a custom HTTP request on the supplied url.

Вижте целият списък на опции на заявката.

Параметри

method

Request method

url

URL

body

Request body

options

опции на заявката

info

Информация за заявка/отговор

Връщани стойности

При успех връща HTTP отговора като низ, или FALSE при неуспех.



add a note add a note User Contributed Notes http_request
Dan 05-Jan-2012 11: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 06:11
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