[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-includes/ -> class-wp-http-streams.php (summary)

HTTP API: WP_Http_Streams class

File Size: 524 lines (17 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 2 classes

WP_Http_Streams:: (3 methods):
  request()
  verify_ssl_certificate()
  test()

WP_HTTP_Fsockopen:: (0 methods):


Class: WP_Http_Streams  - X-Ref

Core class used to integrate PHP Streams as an HTTP transport.

request( $url, $args = array()   X-Ref
Send a HTTP request to a URI using PHP Streams.

return: array|WP_Error Array containing 'headers', 'body', 'response', 'cookies', 'filename'. A WP_Error instance upon error
param: string       $url  The request URL.
param: string|array $args Optional. Override the defaults.
since: 2.7.0
since: 3.7.0 Combined with the fsockopen transport and switched to stream_socket_client().

verify_ssl_certificate( $stream, $host )   X-Ref
Verifies the received SSL certificate against its Common Names and subjectAltName fields.

PHP's SSL verifications only verify that it's a valid Certificate, it doesn't verify if
the certificate is valid for the hostname which was requested.
This function verifies the requested hostname against certificate's subjectAltName field,
if that is empty, or contains no DNS entries, a fallback to the Common Name field is used.

IP Address support is included if the request is being made to an IP address.

return: bool If the certificate presented in $stream is valid for $host
param: resource $stream The PHP Stream which the SSL request is being made over
param: string   $host   The hostname being requested
since: 3.7.0

test( $args = array()   X-Ref
Determines whether this class can be used for retrieving a URL.

return: bool False means this class can not be used, true means it can.
param: array $args Optional. Array of request arguments. Default empty array.
since: 2.7.0
since: 3.7.0 Combined with the fsockopen transport and switched to stream_socket_client().

Class: WP_HTTP_Fsockopen  - X-Ref

Deprecated HTTP Transport method which used fsockopen.

This class is not used, and is included for backward compatibility only.
All code should make use of WP_Http directly through its API.



Generated: Thu Nov 21 01:00:03 2024 Cross-referenced by PHPXref 0.7.1