Get remote URL issue
-
Hi!
Some sites doesn’t allow to get their body if user-agent it’s empty.
I’ve tested adding $_SERVER[‘HTTP_USER_AGENT’] to the wp_remote_get args on the fetchUrl method:includes/class-zwt_wp_linkpreviewer-contentfetcher.php:71
private function fetchUrl($url) { $response = wp_remote_get($url, array( 'timeout' => 120 )); if (is_array($response)) { return wp_remote_retrieve_body($response); } return null; }
If you can add a filter to that arguments that will be awesome.
Thanks!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Get remote URL issue’ is closed to new replies.