Was it because of the pipe character in his title? I tried encoding with htmlentities()
but no dice.
The plugin uses loadHTMLFile()
so I ran some tests with file_get_contents()
and cURL but the same thing happened. Each method works with other sites so it looks like the code is okay.
I have, however, been able to perform a GET request on the post using Requestable so I guess Manton's host is just blocking mine for some reason. ?
@manton ?
@colinwalker That's strange. The site is on DreamHost. I don't know why it would be blocking anything.
@manton Maybe I've liked too many of your posts ?
@colinwalker I think the postkinds plugin had the same problem for me on one of @manton's posts recently..didn't pull back any info from the URL.
@johnjohnston It's strange ?
I'm testing a workaround to the problem I was having loading the contents of certain remote pages when posting a 'like'. 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.