I'm trying to get an image from Google but...
wp_remote_get returns me:
Could not open handle for fopen() to
https://ajax.googleapis.com/ajax/services/search/images?
v=1.0&q=whatever.whatever&key=MYKEYWHICHIDONTPOST&userip=127.0.0"
I don't know why:
- when I enter the url directly I do get results.
- all other wp_remote_gets in the same class work ok so yes php.ini allow=ok
this is the code i run:
$referer_url = get_bloginfo('url');
$referer = $parsed_url[host];
$google_images_url = self::GOOGLE_IMAGES_URL . "&q=" . $url_to_look_for . "&key=" . $key . "&userip=" . $_SERVER['REMOTE_ADDR'];
$response = wp_remote_get($google_images_url, array( 'headers' => array( 'Referer' => $referer)));
hmmm