Using ajax to retrieve http response codes from list of urls

Using ajax to retrieve http response codes from list of urls

Hi,
I am looking for a script (or help with a script) that would allow me to test whether or not a list of urls are valid (Status code 200 etc).

Preferably I would like to use a php script to make a number of ajax calls from within a loop passing the url to be checked to an ajax function which in turn returns the status code back to the php script.

I don't have a problem with the php side of things, but I am at a loss with the ajax functions.
Everything I have managed to find either doesn't work or is not suitable.

Thank-you in advance