As my workflow already grabs the page title (so I can check it before posting) I now add this to the post as an additional custom field.
I have then created a stream context with a 15 second timeout:
$opts = array( 'http'=>array( 'method'=>'get', 'timeout'=>15, ) ); $context = stream_context_create($opts);
and applied it to the remote page collection:
$doc->loadHTMLFile($meta_url, false, $context);
So, if the attempt at loading the page within WordPress times out a quick check means it will fall back to the new custom field instead.
I'll add this to the 'reply' workflow as well.