@@ -75,6 +75,9 @@ class Browser
7575 const BROWSER_CHROME = 'Chrome ' ; // http://www.google.com/chrome
7676 const BROWSER_ANDROID = 'Android ' ; // http://www.android.com/
7777 const BROWSER_GOOGLEBOT = 'GoogleBot ' ; // http://en.wikipedia.org/wiki/Googlebot
78+ const BROWSER_CURL = 'cURL ' ; // https://en.wikipedia.org/wiki/CURL
79+ const BROWSER_WGET = 'Wget ' ; // https://en.wikipedia.org/wiki/Wget
80+
7881
7982 const BROWSER_YANDEXBOT = 'YandexBot ' ; // http://yandex.com/bots
8083 const BROWSER_YANDEXIMAGERESIZER_BOT = 'YandexImageResizer ' ; // http://yandex.com/bots
@@ -480,6 +483,8 @@ protected function checkBrowsers()
480483 $ this ->checkBrowserIceCat () ||
481484 $ this ->checkBrowserIceweasel () ||
482485 $ this ->checkBrowserW3CValidator () ||
486+ $ this ->checkBrowserCurl () ||
487+ $ this ->checkBrowserWget () ||
483488 $ this ->checkBrowserPlayStation () ||
484489 $ this ->checkBrowserIframely () ||
485490 $ this ->checkBrowserCocoa () ||
@@ -1706,6 +1711,39 @@ protected function checkBrowserPlayStation()
17061711 return false ;
17071712 }
17081713
1714+ /**
1715+ * Determine if the browser is Wget or not (last updated 1.7)
1716+ * @return boolean True if the browser is Wget otherwise false
1717+ */
1718+ protected function checkBrowserWget ()
1719+ {
1720+ if (preg_match ("!^Wget/([^ ]+)!i " , $ this ->_agent , $ aresult ))
1721+ {
1722+ $ this ->setVersion ($ aresult [1 ]);
1723+ $ this ->setBrowser (self ::BROWSER_WGET );
1724+ return true ;
1725+ }
1726+ return false ;
1727+ }
1728+ /**
1729+ * Determine if the browser is cURL or not (last updated 1.7)
1730+ * @return boolean True if the browser is cURL otherwise false
1731+ */
1732+ protected function checkBrowserCurl ()
1733+ {
1734+ if (strpos ($ this ->_agent , 'curl ' ) === 0 )
1735+ {
1736+ $ aresult = explode ('/ ' , stristr ($ this ->_agent , 'curl ' ));
1737+ if (isset ($ aresult [1 ])) {
1738+ $ aversion = explode (' ' , $ aresult [1 ]);
1739+ $ this ->setVersion ($ aversion [0 ]);
1740+ $ this ->setBrowser (self ::BROWSER_CURL );
1741+ return true ;
1742+ }
1743+ }
1744+ return false ;
1745+ }
1746+
17091747 /**
17101748 * Determine the user's platform (last updated 2.0)
17111749 */
0 commit comments