![]() |
CodeIgniter Session spammed by bots - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: External Resources (https://forum.codeigniter.com/forumdisplay.php?fid=7) +--- Forum: Addins (https://forum.codeigniter.com/forumdisplay.php?fid=13) +--- Thread: CodeIgniter Session spammed by bots (/showthread.php?tid=62908) |
CodeIgniter Session spammed by bots - jimbon - 09-07-2015 hello, my website has visits from various search engine bots. I would like to ignore the bots from the session table. i tried with this library https://github.com/donjakobo/codeigniter-clean-sessions but didn't work with ci 3. Any help? RE: CodeIgniter Session spammed by bots - mwhitney - 09-08-2015 I'm not sure how well this would work, as it would depend at least somewhat on your site's ability to continue to function without a session, but you could extend the sessions library in a similar fashion to the library you linked by creating a file in /application/libraries/Session/MY_Session.php: PHP Code: <?php This also depends on the ability to access the loader (and, in turn, the user_agent library) at the time the session library is loaded. Note that this should be the entire contents of the new file. All it does is load the user_agent library to check whether it can identify a robot. If it identifies a robot, it logs a debug message and exits. Otherwise, it turns control back over to the parent, making sure to pass along any parameters which may have been passed by the loader. RE: CodeIgniter Session spammed by bots - rolly - 11-06-2015 mwhitney, thank u. I use this construction, work it. but I edit this array list maybe somebody need this. PHP Code: $robots = array( RE: CodeIgniter Session spammed by bots - allenlee - 05-21-2016 I am developing an Anti-Scraping library https://github.com/terrylinooo/Codeigniter-Anti-Scraping-Library Just completed the document, still testing it. I will uplodad the library soon.. RE: CodeIgniter Session spammed by bots - skunkbad - 05-21-2016 Maybe it is a simple solution where you have a blacklist in MY_Session.php: Code: <?php |