tumblr hacky workaround
lllusion3418 edited this page 7 months ago

Disclaimer: Not endorsed by fox in any way. If you think, this is an abuse of the wiki functionality, tell me please.

You can use e.g. cliget to get your cookies. If you're logged in it works everywhere including NSFW blogs. You have to adjust the useragentstring too. You can use either cliget too or e.g. this website

Usage: http://your.address.tld/path/tumblr.php?url=TUMBLR_URL

NOTE: If this is publicly accessible, anyone can get your cookies, and thus limited access to the associated account!

License: CC0 if you really want one.

<?php
$url = $_GET["url"];

if (preg_match('/^https?:/', $url) !== 1) {
    throw new Exception('not a url');
}

$cookies = <<<EOF
YOUR COOKIES HERE
EOF
;
$useragent = 'YOUR USER AGENT HERE';

$opts = array(
    'http' => array(
        'method' => "GET",
        'header' => "User-Agent: $useragent\r\n" .
                    "Cookie: $cookies\r\n"
    )
);

$context = stream_context_create($opts);

$fp = fopen($url, 'rb', false, $context);
fpassthru($fp);
fclose($fp);