It should return a boolean instead of a string.

Recommend this page to a friend!

      Bot Class  >  All threads  >  It should return a boolean instead...  >  (Un) Subscribe thread alerts  
Subject:It should return a boolean instead...
Summary:Package rating comment
Messages:3
Author:André Karell Contreras Jiménez
Date:2015-08-17 03:00:22
 

André Karell Contreras Jiménez rated this package as follows:

Utility: Bad
Consistency: Bad
Examples: Sufficient

  1. It should return a boolean instead...   Reply   Report abuse  
Picture of André Karell Contreras Jiménez André Karell Contreras Jiménez - 2015-08-17 03:00:22
It should return a boolean instead of a string. The format lack of consistency and while it could technically identify some bots, it should have more test to identify if it is a bot or not, maybe a better tool could be a JS oriented one, but server-side can do more than just search for 'bot' in the user agent.

  2. Re: It should return a boolean instead...   Reply   Report abuse  
Picture of Ruben Elizondo Ruben Elizondo - 2015-08-20 20:11:00 - In reply to message 1 from André Karell Contreras Jiménez
This little function works great for me....thats the reason i decided to share here....yes it should be a boolean....but it works this way....remember son....the simple, the better

  3. Re: It should return a boolean instead...   Reply   Report abuse  
Picture of John Haywood John Haywood - 2015-08-21 09:20:09 - In reply to message 2 from Ruben Elizondo
If you wanted simple, then you could have used a function which would then only be loaded when called, instead of the Class taking up memory all of the time (especially if auto-loaded).

 

For more information send a message to info at phpclasses dot org.