999 Error Code on HEAD request to LinkedIn

前端 未结 4 712
[愿得一人]
[愿得一人] 2020-11-29 05:18

We\'re using a curl HEAD request in a PHP application to verify the validity of generic links. We check the status code just to make sure that the link the user has entered

4条回答
  •  南笙
    南笙 (楼主)
    2020-11-29 05:52

    Seems like LinkedIn filter both user agent AND ip address. I tried this both at home and from an Digital Ocean node:

    curl -A "Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3" -I --url https://www.linkedin.com/company/linkedin
    

    From home I got a 200 OK, from DO I got 999 Denied...

    So you need a proxy service like HideMyAss or other (haven't tested it so I couldn't say if it's valid or not). Here is a good comparison of proxy services.

    Or you could setup a proxy on your home network, for example use a Raspberry PI to proxy your requests. Here is a guide on that.

提交回复
热议问题