# In reply to: 04/07/2017, 07:33...

I think I've cracked it! When a webmention is received I should be able to get the details from the comment meta and work from there.

Setting up a new DOMDocument and loading it with the contents of the page that sent the webmention I can loop through the link tags until I find the first one that is an RSS or Atom feed. From here I pull the href attribute and write it back to the comment meta.

Should the feed URL be a relative path (as used by at least one person) I have had to construct the full path based on the root address. Hopefully it will be a reliable process.

Once the feed URL is in the comment meta it can be pulled from the database and inserted into the OPML file as it is constructed.

Now I just need to ensure that the OPML file is properly formatted and that the action to hook into comment_post actually works properly.