Jump to content

checking links


anatak

Recommended Posts

Is it possible to check if a url (link) is still active ?

 

I was thinking maybe you can check a link with a http response request and check what you get back ?

 

so when you get a 404 page not found response you can mark that link to be deleted or something like that.

 

I am not sure if I am making myself clear.

 

anatak

Link to comment
https://forums.phpfreaks.com/topic/78394-checking-links/
Share on other sites

Is it possible to check if a url (link) is still active ?

 

I was thinking maybe you can check a link with a http response request and check what you get back ?

 

so when you get a 404 page not found response you can mark that link to be deleted or something like that.

 

I am not sure if I am making myself clear.

 

anatak

Probably better to do it whitelist based instead of blacklist based.

Like if the response is 200 then mark it as valid, if not then mark it as invalid.

And if it's 301 or 302 then test the URL in the location header.

Link to comment
https://forums.phpfreaks.com/topic/78394-checking-links/#findComment-396795
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.