WordPress.org

Ready to get started?Download WordPress

Codex

Function Reference/wp remote fopen

Contents

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

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.