Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




wp_remote_fopen [ WordPress Function ]

wp_remote_fopen ( $uri )
Parameters:
  • (string) $uri URI/URL of web page to retrieve.
Uses:
Returns:
  • (bool|string) HTTP content. False on failure.
Defined at:



HTTP request for URI to retrieve content.

Source


<?php
function wp_remote_fopen$uri ) {
    
$parsed_url = @parse_url$uri );

    if ( !
$parsed_url || !is_array$parsed_url ) )
        return 
false;

    
$options = array();
    
$options['timeout'] = 10;

    
$response wp_remote_get$uri$options );

    if ( 
is_wp_error$response ) )
        return 
false;

    return 
wp_remote_retrieve_body$response );
}
?>

Examples [ wp-snippets.com ]

Google Arama Sonuçlarý

Dahasý ...

Kullanýcý Tartýþmalarý [ wordpress.org ]

- Bulunamadý -

Yeni bir konu yaz ...

0 User Note(s)

Henüz yok. Ýlk sen ol!

Yeni Ekle ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics