Mobile-Detect
Mobile-Detect copied to clipboard
[Feature Request] Detect command line user agents like curl, wget, PowerShell
I think a great feature to add to Mobile-Detect would be to detect if the user agent is command line based such as curl, wget, PowerShell, etc. That way you could use a command like isCommandLine()
or isTextBased()
or isCLI()
.
As an example to illustrate the purpose, the website https://qrenco.de shows up as a regular website in a browser, but if you issue the command curl qrenco.de/https://github.com
in your CLI it responds with a QR code. I was thinking - did they use a library to detect that? I don't see the option in Mobile-Detect, so I thought I'd suggest it. 😊
Here is a list of 149 well known user agents that are command line based: https://gist.github.com/asheroto/ef04c4f067be68bd770395a32967811d