php - wp_remote_get fails with "Failure when receiving data from the peer" -
php - wp_remote_get fails with "Failure when receiving data from the peer" -
i'm trying file contents of file this:
$google_fonts = (array)wp_remote_get( theme_admin_uri.'/google_fonts.txt' );
on var_dump($google_fonts);
prints this:
array(2) { ["wp_errorerrors"]=> array(1) { ["http_request_failed"]=> array(1) { [0]=> string(41) "failure when receiving info peer" } } ["wp_errorerror_data"]=> array(0) { } }
this first time see this. i'm on back upwards task on foreign server , wp installation, have limited access, php , server settings. path good, , on server , localhost, works fine. file can accessed straight in browser.
if seek utilize file_get_contents()
based on local directory not domain, works.
any ideas what's causing this?
i've seen wp_remote_get() fail when domain beingness requested uses cloudflare -- how cloudflare ssl confuses wp_remote_get() , requests error out when ssl certs (both on site , within cloudflare) appear configured.
php wordpress httprequest
Comments
Post a Comment