I would like to ask if you can directly access the image resource 403, you can access it on the web page, how to achieve it?
**推广网
**推广网 2018-08-09 17:58:30
0
4
1473

For example

There is no problem accessing the first image from this webpage

https://ask.csdn.net/questions/676365


Access the image link directly in the browser address bar and cannot access it

https://img-ask.csdn.net/upload/201712/29/1514512374_397838.jpg


How do you do this? I also want to make a similar function


**推广网
**推广网

中国推广网:http://bbs.iaozi.com

reply all(3)
青Blue

The other party's server is configured with anti-leeching. Generally, the source is verified, which is the referer field in the http header. When you access the page, the browser has its own Referer field. You enter the URL directly from the address bar and the referer is empty. , so it cannot be accessed. You can use the CURL command line tool to test the specific reason

秋香姐家的小书童

URL is sound Principle: When opening a picture, a token is generated and the TOKEN is sent to the corresponding picture server. If the TOKEN is incorrect, the picture cannot be opened


Summer

Maybe it’s anti-hotlink protection

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template