I need to fetch the contents of a remote file. Which is better for performance – wp_remote_get, file_get_contents, or cURL?
How exactly does wp_remote_get work? Can you suppress errors, ex. @wp_remote_get ?
Thanks
I need to fetch the contents of a remote file. Which is better for performance – wp_remote_get, file_get_contents, or cURL?
How exactly does wp_remote_get work? Can you suppress errors, ex. @wp_remote_get ?
Thanks
You must be logged in to post a comment.
Always use wp_remote_get when in a WordPress context. It figures out the correct way, be it curl or something else, and uses that. Simple.