Due to how Badspot seems to run the images through a proxy(Look at HTTP header Vary) it is quite odd that they wont return correct information for respective file. Therefor, I threw together a script on my host and cleaned up the script that was provided in this thread.
It is like a relay where it downloads the file to the server and outputs its own version with correct used headers.
http://redirect.aposoc.net/image.blockland.us/detail.php?q=98-218-192-31_28000(If you got Firefox you can press Ctrl+Shift+K to get up Web Console and check the headers there)
The script is followed below:
$imgDownloader = new tcpObject(imgDownloader);
// Connecting
function imgDownloader::onConnected(%this)
{
// Prepare file
%file = "/image.blockland.us/detail.php?q=" @ strReplace(strReplace(%this.ip,".","-"),":","_");
%this.contentLength = 0;
%this.send("GET " @ %file @ " HTTP/1.0\r\nHost:redirect.aposoc.net\r\nAccept-Encoding: identity\r\nTE: identity\r\n\r\n");
}
// Getting text
function imgDownloader::onLine(%this, %line)
{
%var = strlwr(firstWord(%line));
%value = restWords(%line);
// Check size
if (%var $= "content-length:")
%this.contentLength = %value << 0;
// Start transfer of binary file
if (%line $= "")
%this.setBinarySize(%this.contentLength);
}
// Getting binary file
function imgDownloader::onBinChunk(%this, %size)
{
if (%this.contentLength !$= 0 && %size >= %this.contentLength)
{
%this.finish();
%this.disconnect();
}
}
// Finishing up
function imgDownloader::finish(%this)
{
%this.saveBufferToFile("config/preview.png");
}
// Prepare and connect
function imgDownloader::downloadImg(%this, %ip)
{
%this.disconnect();
%this.setBinary(0);
%this.ip = %ip;
%this.connect("redirect.aposoc.net:80");
}Try connect it with:
$imgdownloader.downloadImg("98.218.192.31:28000");Should work most the time.
If code is abused, I sure will take down the link. I can provide with PHP code if anyone is interested.