diff options
author | pebosi <mail@pebosi.net> | 2016-08-11 16:16:24 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-11 16:16:24 +0300 |
commit | 9e673d4fd9546708a39218f36133b026094ea6d9 (patch) | |
tree | f5b56381d706f6b61bd5f5b5b10594b76e1acd25 /plugins/SEO | |
parent | 66c089cf294bf37d0b3dda4280344ffa7f73fa9e (diff) |
Fix language
Diffstat (limited to 'plugins/SEO')
-rw-r--r-- | plugins/SEO/Metric/Bing.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/SEO/Metric/Bing.php b/plugins/SEO/Metric/Bing.php index 71553ffc6e..b0805548d4 100644 --- a/plugins/SEO/Metric/Bing.php +++ b/plugins/SEO/Metric/Bing.php @@ -18,7 +18,7 @@ use Psr\Log\LoggerInterface; */ class Bing implements MetricsProvider { - const URL = 'http://www.bing.com/search?mkt=en-US&q=site%3A'; + const URL = 'http://www.bing.com/search?setlang=en-US&rdr=1&q=site%3A'; /** * @var LoggerInterface @@ -37,8 +37,8 @@ class Bing implements MetricsProvider try { $response = str_replace(' ', ' ', Http::sendHttpRequest($url, $timeout = 10, @$_SERVER['HTTP_USER_AGENT'])); - if (preg_match('#([0-9\,]+) results#i', $response, $p)) { - $pageCount = NumberFormatter::getInstance()->formatNumber((int)str_replace(',', '', $p[1])); + if (preg_match('#([0-9,\.]+) results#i', $response, $p)) { + $pageCount = NumberFormatter::getInstance()->formatNumber((int)str_replace(array(',', '.'), '', $p[1])); } else { $pageCount = 0; } |