php 爬虫

PHP Simple HTML DOM Parser

https://blog.csdn.net/qq_39708228/article/details/118175277

https://simplehtmldom.sourceforge.io/docs/1.9/index.html

https://www.iteye.com/blog/wsfei-1139132

第一种方法是利用Referer头来判断是否是合法请求

location ~* \.(gif|jpg|png|swf|flv)$ { 
  valid_referers none blocked www.xxx.com xxx.com ; 
  if ($invalid_referer) { 
    #return 403;  #直接提示拒绝访问
    rewrite ^/ http://www.xxx.com/xxx.jpg;  #返回特定的图片
  } 
}

#none意为不存在的Referer头。

#blocked意为根据防火墙伪装Referer头,如:“Referer: XXXXXXX”。

https://www.cnblogs.com/phploger/p/13999647.html

posted @ 2022-08-15 09:53  星云惊蛰  阅读(18)  评论(0)    收藏  举报