get_error_message(); $rc = -1; } } else { $fileout = wp_remote_get( $filein ); if ( is_wp_error( $fileout ) ) { $error = 'Body: ' . $fileout -> get_error_message(); $rc = -1; } else { if ( isset( $fileout[ 'body' ] ) ) { $file_return[ 'file' ] = $fileout[ 'body' ]; } } } $file_return[ 'error' ] = $error; $file_return[ 'rc' ] = $rc; if ( !is_wp_error( $fileout ) ) { if ( isset( $fileout[ 'response' ][ 'code' ] ) ) { $file_return[ 'response' ] = $fileout[ 'response' ][ 'code' ]; } } return $file_return; } /** * Extract Parameters (1.1) * * Function to extract parameters from an input string * * @since 1.0 * * @param $input string Input string * @param $para string Parameter to find * @return string Parameter value */ function acc_get_parameters( $input, $para, $divider = '=', $seperator = '&' ) { $start = strpos( strtolower( $input ), $para . $divider); $content = ''; if ( $start !== false ) { $start = $start + strlen( $para ) + 1; $end = strpos( strtolower( $input ), $seperator, $start ); if ( $end !== false ) { $end = $end - 1; } else { $end = strlen( $input ); } $content = substr( $input, $start, $end - $start + 1 ); } return $content; } ?>