How to check a URL

Results 1 to 2 of 2

Thread: How to check a URL

  1. #1
    Join Date
    Dec 1969

    Default How to check a URL

    I have a database of image urls and need to check which of these are rendering. When I call my asp page, I will query the database to get the list of urls and then I want to check all the urls in the recordset and only display the ones which do not render. I can do the DB query part, I just don't know how to write some URL checking code in asp.

  2. #2
    Join Date
    Dec 1969

    Default RE: How to check a URL

    Investigate the XMLHTTP object - you can use it to make HTTP requests for files. Basically do a HEAD request and check the HTTP response code. If it&#039;s 200, the file exists. If it&#039;s 404, the file doesn&#039;t exist. 5xx for server-side errors, 3xx for redirects, 4xx usually for different authorisation problems... There are lots of lists of HTTP codes.<BR><BR>Craig.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts