in reply to Referer header

You need to get this working in a browser so you can use webtools to review what is going on. Most likely you are meant to request a login/verification page where you will be given a cookie and may have to login. You then need to specify that cookie in the headers of your request.