Open asheroto opened 1 year ago
I think that would go out fo the scope of the plugin. It's not meant to be a full rounded detection plugin. The detection you wrote about can be done with a couple of lines of code of php
Ah, I see. Is that also why isBot()
was removed from later releases?
it's possibile, but I'm not sure, I didn't even know :D
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()
orisTextBased()
orisCLI()
.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