@@ -74,6 +74,9 @@ class Browser
7474 const BROWSER_CHROME = 'Chrome ' ; // http://www.google.com/chrome
7575 const BROWSER_ANDROID = 'Android ' ; // http://www.android.com/
7676 const BROWSER_GOOGLEBOT = 'GoogleBot ' ; // http://en.wikipedia.org/wiki/Googlebot
77+ const BROWSER_CURL = 'cURL ' ; // https://en.wikipedia.org/wiki/CURL
78+ const BROWSER_WGET = 'Wget ' ; // https://en.wikipedia.org/wiki/Wget
79+
7780
7881 const BROWSER_YANDEXBOT = 'YandexBot ' ; // http://yandex.com/bots
7982 const BROWSER_YANDEXIMAGERESIZER_BOT = 'YandexImageResizer ' ; // http://yandex.com/bots
@@ -478,6 +481,8 @@ protected function checkBrowsers()
478481 $ this ->checkBrowserIceCat () ||
479482 $ this ->checkBrowserIceweasel () ||
480483 $ this ->checkBrowserW3CValidator () ||
484+ $ this ->checkBrowserCurl () ||
485+ $ this ->checkBrowserWget () ||
481486 $ this ->checkBrowserPlayStation () ||
482487 $ this ->checkBrowserIframely () ||
483488 $ this ->checkBrowserCocoa () ||
@@ -1680,6 +1685,39 @@ protected function checkBrowserPlayStation()
16801685 return false ;
16811686 }
16821687
1688+ /**
1689+ * Determine if the browser is Wget or not (last updated 1.7)
1690+ * @return boolean True if the browser is Wget otherwise false
1691+ */
1692+ protected function checkBrowserWget ()
1693+ {
1694+ if (preg_match ("!^Wget/([^ ]+)!i " , $ this ->_agent , $ aresult ))
1695+ {
1696+ $ this ->setVersion ($ aresult [1 ]);
1697+ $ this ->setBrowser (self ::BROWSER_WGET );
1698+ return true ;
1699+ }
1700+ return false ;
1701+ }
1702+ /**
1703+ * Determine if the browser is cURL or not (last updated 1.7)
1704+ * @return boolean True if the browser is cURL otherwise false
1705+ */
1706+ protected function checkBrowserCurl ()
1707+ {
1708+ if (strpos ($ this ->_agent , 'curl ' ) === 0 )
1709+ {
1710+ $ aresult = explode ('/ ' , stristr ($ this ->_agent , 'curl ' ));
1711+ if (isset ($ aresult [1 ])) {
1712+ $ aversion = explode (' ' , $ aresult [1 ]);
1713+ $ this ->setVersion ($ aversion [0 ]);
1714+ $ this ->setBrowser (self ::BROWSER_CURL );
1715+ return true ;
1716+ }
1717+ }
1718+ return false ;
1719+ }
1720+
16831721 /**
16841722 * Determine the user's platform (last updated 2.0)
16851723 */
0 commit comments