Code to validate external links?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Kevin Thorpe

    #1

    Code to validate external links?

    Does anyone know of a simple script for validating a list of external links?

    There are portal packages out there which do this, but I just want
    something simple to check links held in my database for rot. Nothing
    worse than giving customers 404's to make us look like wallies.

    I know it's relatively simple to use fopen() on each one but I really
    can't be bothered writing a scheduler and such.

    Any pointers gratefully received.

    Kev

  • Martin Lucas-Smith

    #2
    Re: Code to validate external links?



    [color=blue]
    > Does anyone know of a simple script for validating a list of external
    > links?
    >
    > There are portal packages out there which do this, but I just want
    > something simple to check links held in my database for rot. Nothing
    > worse than giving customers 404's to make us look like wallies.
    >
    > I know it's relatively simple to use fopen() on each one but I really
    > can't be bothered writing a scheduler and such.
    >
    > Any pointers gratefully received.[/color]

    No, but I use the linux 'Checkbot' program which is much better than a
    roll-your-own PHP script.


    This also deals with 301s and other server responses, which is really what
    you want for any sort of professional site.


    Also, you could dump everything to one page then use
    http://validator.w3.org/checklink



    Martin Lucas-Smith www.geog.cam.ac.uk/~mvl22



    Comment

    • Kevin Thorpe

      #3
      Re: Code to validate external links?

      Martin Lucas-Smith wrote:[color=blue]
      >
      >[color=green]
      >>Does anyone know of a simple script for validating a list of external
      >>links?
      >>
      >>There are portal packages out there which do this, but I just want
      >>something simple to check links held in my database for rot. Nothing
      >>worse than giving customers 404's to make us look like wallies.
      >>
      >>I know it's relatively simple to use fopen() on each one but I really
      >>can't be bothered writing a scheduler and such.
      >>
      >>Any pointers gratefully received.[/color]
      >
      >
      > No, but I use the linux 'Checkbot' program which is much better than a
      > roll-your-own PHP script.
      > http://degraaff.org/checkbot/
      >
      > This also deals with 301s and other server responses, which is really what
      > you want for any sort of professional site.[/color]

      That looks something like what I want. I'll need to build a custom page
      to serve all the links (they're delivered by searching at the moment, no
      complete list). I'll also need to parse the output to mark items with
      bad links as such. Worth a look though.

      Thanks
      Kev

      Comment

      Working...