Index: trunk/wap/image.php |
— | — | @@ -41,6 +41,10 @@ |
42 | 42 | curl_setopt($ch, CURLOPT_URL, $url); |
43 | 43 | curl_setopt($ch, CURLOPT_HEADER, 0); |
44 | 44 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); |
| 45 | + |
| 46 | + // WP otherwise says: "Please provide a User-Agent header" |
| 47 | + curl_setopt($ch, CURLOPT_USERAGENT, "hawpedia"); |
| 48 | + |
45 | 49 | $curlResultString = curl_exec($ch); |
46 | 50 | if (!is_string($curlResultString)) { |
47 | 51 | fatalError("Couldn't reach remote image repository."); |