Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'these urls return code 403 but they are valid image urls
- url = "https://www.skymedia.co.uk/wp-content/uploads/2016/05/Sky-Sports-Mix.png"
- 'url = "https://www.skymedia.ie/wp-content/uploads/sites/4/2016/01/channel-logo-tlc.png"
- 'this url returns code 403 which is correct
- 'url = "https://www.skymedia.co.uk/wp-content/uploads/2016/05/Sky-Sports-Mix.png"
- 'this url returns code 200 which is correct
- 'url = "http://cdn.cablefax.com/wp-content/uploads/2014/06/golf-logo.jpg"
- Set req = CreateObject("MSXML2.ServerXMLHTTP.6.0")
- req.open "GET", url, False
- req.send
- 'check http status codes
- If req.Status = 200 Then httpCode = "HTTP 200 OK - "
- If req.Status = 400 Then httpCode = "HTTP 400 Bad Request - "
- If req.Status = 403 Then httpCode = "HTTP 403 Forbidden - "
- If req.Status = 404 Then httpCode = "HTTP 404 Not Found - "
- WScript.Echo httpCode & url
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement