Phpworker
answered Nov 30 '-1 00:00
To prevent website scrapping . you need to identify request coming from human or machine , mostly server have cron (program) which scrap site and grab the data(data mining).
you can put filter on all request , check if it is valid user or not .
to check is valid human or machine , you can do some filter on all request to your website
1. check whether its requested by browser or not . when cron or machine crawling by other server side scripting language than its not done by through the browser . web page requested by the server side language directly .
how to check is it browser called web page or script ?
$useragent=$_SERVER['HTTP_USER_AGENT'];
if($useragent==''){
echo "Hi i am machine ";
}
else {
echo "i called you by browser"
}
$_SERVER['HTTP_USER_AGENT'] give browser , mostly its empty for web crawler ,