Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. 'these urls return code 403 but they are valid image urls
  2. url = "https://www.skymedia.co.uk/wp-content/uploads/2016/05/Sky-Sports-Mix.png"
  3. 'url = "https://www.skymedia.ie/wp-content/uploads/sites/4/2016/01/channel-logo-tlc.png"
  4.  
  5. 'this url returns code 403 which is correct
  6. 'url = "https://www.skymedia.co.uk/wp-content/uploads/2016/05/Sky-Sports-Mix.png"
  7.  
  8. 'this url returns code 200 which is correct
  9. 'url = "http://cdn.cablefax.com/wp-content/uploads/2014/06/golf-logo.jpg"
  10.  
  11. Set req = CreateObject("MSXML2.ServerXMLHTTP.6.0")
  12. req.open "GET", url, False
  13. req.send
  14.  
  15. 'check http status codes
  16. If req.Status = 200 Then httpCode = "HTTP 200 OK - "
  17. If req.Status = 400 Then httpCode = "HTTP 400 Bad Request - "
  18. If req.Status = 403 Then httpCode = "HTTP 403 Forbidden - "
  19. If req.Status = 404 Then httpCode = "HTTP 404 Not Found - "
  20.  
  21. WScript.Echo httpCode & url
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement