This is my solution
$q = new WP_Query(array('post_type' => 'post'));
if ( $q->have_posts() ) {
while ( $q->have_posts() ) {
$q->the_post();
ob_start();
the_content();
$c = ob_get_contents();
ob_end_clean();
$items[] = sprintf($item_tpl, get_the_title(), $c);
}
}
I am not sure that dropbox links were without https, the HTTP error that you got, was error 302, which means MOVED, and a new location is shown in the headers. Allowing cURL to follow that header, will get the data.
It’s a direct link that dropbox copies, so you don’t have to change anything about it, the only issue was the 302 header.
@mytory
I’ve placed a fork on github, and a pull request which I think will fix the issue.
Essentially, it’s merely allowing curl to follow the redirection that dropbox provides.