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');
?>
http_request
(PECL pecl_http >= 1.0.0)
http_request — Perform custom request
Beschreibung
string http_request
( int
$method
, string $url
[, string $body
[, array $options
[, array &$info
]]] )Performs a custom HTTP request on the supplied url.
Siehe auch die vollständige Liste der Request-Optionen.
Parameter-Liste
-
method -
Request method
-
url -
URL
-
body -
Request body
-
options -
info
Rückgabewerte
Gibt die HTTP-Antwort(en) als String zurück oder FALSE bei Fehlern.
Dan ¶
1 year ago
halfcountplus at intergate dot com ¶
2 years ago
method arg is a define, eg "POST"
You need to install pecl_http to use this.
