0

I have a MySQL database with a list of URLs that I want to check from time to time for broken links.

www.url1.com/product1/site.html
www.url2.com/product2/site.html
www.url3.com/product3/site.html

There seems to be no MySQL command like get_content etc.

What I want is a list of all broken links (e.g. returns 404/503) to delete them from the DB. Is there any way to do that at all from the DB directly?

Karsten
  • 81
  • 1
  • 13
  • A database management system like MySQL deals with data, storage and retrieval. It does not know what a `URL` is and what it is for. Not more, not less. You will need to use some additional component. Easiest would be to implement a simple script that periodically checks the URL and can remove any URL it receives an error code upon. – arkascha Feb 07 '16 at 09:43
  • You need to use some programming language like PHP, connect to database, fetch URLs and checked them - for ex. like here - http://stackoverflow.com/questions/15770903/check-if-links-are-broken-in-php – Ondřej Šotek Feb 07 '16 at 09:44
  • Thanks. Wasn't sure if possible at all. This answers! – Karsten Feb 07 '16 at 09:45

1 Answers1

0

The comments answered it, checking URL links needs to be a separate operation e.g in PHP and cannot be done in the database. Thanks

Karsten
  • 81
  • 1
  • 13