This is just a quick post for anybody who's been having the same ridiculous problem I've been experiencing. If you have sites on Tumblr, and you're using CURL (or any other method really, but this fix just applies to CURL) and getting blank responses, here's how to fix it.
It's a really stupid issue to have, but it's caused because sometimes Tumblr returns content, and sometimes Tumblr returns that a resource has moved. Unless you tell CURL to follow redirects, nothing is going to happen, except that you're going to get a blank page. To do it via PHP, set the following CURL options:
curl_setopt($ch,CURLOPT_FOLLOWLOCATION,true);
curl_setopt($ch,CURLOPT_MAXREDIRS,10);
This will allow CURL to follow up to 10 redirects before quitting. I set it at ten, because I've seen anywhere from 2 to 8 redirects before returning content on Tumblr's part. To make CURL follow redirects via the command line, use the -L switch.
Text is formatted with Markdown.
There are no comments made so far.