URL Checker - (One Stage Further)

Discussion in 'ASP General' started by Graham Mattingley, Sep 13, 2003.

  1. Hello Groups,

    I have been testing a script I found that checks URL as valid...
    It uses the XMLHTTP.4.0 object

    sURL = "http://www.bbc.co.uk"
    Set obj = CreateObject("MSXML2.XMLHTTP.4.0")
    on error resume next
    obj.open "GET", sURL, False
    obj.send

    iStatus = obj.Status
    on error goto 0

    this works fine on most URLS, though I do have some problems with redirected
    URLs, what I have managed to do is do a database select statement outside of
    the script and check my database of URLs.. This works fine..

    My Database of URL are the backend of a search engine I have written, what I
    was wondering, is instead of me doing a seperate external check of the URLs
    using the database as above, can I do something like.....

    When the user clicks on a URL, they have a varable director.asp?url=blar
    blar blar, this goes to a page that does a redirect to the URL.

    Is it possible for me to use the XMLHTTP object to do the redirect, and this
    way would it be possible for me to have the users of my site check the URL
    by grabbing the value of the statuscode from the XMLHTTP object before it is
    redirected. I would like to be able to have the links constantly checked by
    the users rather than me have to manually as above say every month.

    something like this, if you see below I would be very keen not to make the
    jump to the URL slower, so once the URL had been checked using XMLHTTP then
    maybe it would be possible to use the redirect...

    CLICK ON LINK
    |
    CHECK URL EXISTS USING XMLHTTP
    |
    UPDATE DATABASE WITH LAST CHECKED TIMESTAMP
    |
    REDIRECT TO THE URL

    I am not sure if any of this is possible, butjust simple I would like the
    user clicking on the link actually check it for me, and have a column in the
    database called last_checked TIMESTAMP

    Graham Mattingley
    Graham Mattingley, Sep 13, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Brian Folke Seaberg

    Initialization -- One Stage or Two Stage

    Brian Folke Seaberg, Jan 4, 2005, in forum: C++
    Replies:
    4
    Views:
    722
    Howard
    Jan 4, 2005
  2. andreyvul

    how to do two-stage preprocessing of one file

    andreyvul, Nov 12, 2007, in forum: C Programming
    Replies:
    11
    Views:
    495
    Ark Khasin
    Nov 13, 2007
  3. andreyvul

    how to do two-stage preprocessing of one file

    andreyvul, Nov 12, 2007, in forum: C Programming
    Replies:
    1
    Views:
    324
    santosh
    Nov 13, 2007
  4. Pager O Rama

    MSN BLOCK CHECKER-MSN STATUS CHECKER-MSN PROBLEMS

    Pager O Rama, Apr 4, 2006, in forum: ASP General
    Replies:
    0
    Views:
    240
    Pager O Rama
    Apr 4, 2006
  5. Jacob Grover
    Replies:
    5
    Views:
    309
    Jacob Grover
    Jul 18, 2008
Loading...

Share This Page