if ( function_exists( 'session_status'
) && PHP_SESSION_ACTIVE ===
session_status() ) { /*
* Close any active session to prevent HTTP requests from timing out
* when attempting to connect back to the site.
*/
session_write_close();
} $url =
add_query_arg( $scrape_params,
$url );
$r =
wp_remote_get( $url,
compact( 'cookies', 'headers', 'timeout', 'sslverify'
) );
$body =
wp_remote_retrieve_body( $r );
$scrape_result_position =
strpos( $body,
$needle_start );
$loopback_request_failure = array
( 'code' => 'loopback_request_failed',
'message' =>
__( 'Unable to communicate back with site to check for fatal errors, so the PHP change was reverted. You will need to upload your PHP file change by some other means, such as by using SFTP.'
),
);
$json_parse_failure = array
( 'code' => 'json_parse_error',
);