WordPress.org

Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/wp remote fopen

Description

Returns the contents of a remote URI. Tries to retrieve the HTTP content with fopen first and then using cURL, if fopen can't be used.

Usage

 <?php $contents wp_remote_fopen($uri); ?> 

Parameters

$uri
(string) (required) The URI of the remote page to be retrieved.
Default: None

Return Values

(bool|string) 
HTTP content. False on failure.

Examples

Notes

See http://codex.wordpress.org/HTTP_API

Change Log

Since: 1.5.1

Source File

wp_remote_fopen() is located in wp-includes/functions.php

Related

 

See also index of Function Reference and index of Template Tags.