java - How to know whether a URL request for my website is from browser or from a automated program -


my requirement know whether request webpage genuine request (through browser ) or automated request generated through java program. can differentiate request type?

actually need block requests generated program hence searching difference.

there no fool proof way of doing this. effective solution me was:

  1. implement user agent check @ web server level (yes not fool proof). target block out known / common programs people use hit urls. libperl, httpclient etc. should able build such list access logs.

  2. depending on situation, may or may not want search engine spiders crawl site. add robots.txt server accordingly. not spiders / crawlers follow instructions robots.txt, do.

  3. use specialized tool detect abnormal access site. https://www.cloudflare.com/ can track access site, , match ever growing database of known , suspected bots.

note: in no way affiliated cloudflare :)


Comments

Popular posts from this blog

node.js - Bad Request - node js ajax post -

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -