How to download all issues on PHP Architect at once

How to download all issues on PHP Architect at once


So, you got your brand new PHP Architect subscription and want to download all issues automatically?

Well, it isn’t a built-in feature in PHP Arch, but I created a little JavaScript script to do it for you. Take a look:

Just run this JavaScript code while logged in to PHP Arch on your browser:

var base_url = "https://www.phparch.com/account/pickup/magazine/";
var types = ['pdf', 'epub', 'mobi'];

var latest = 215; // Change this to the ID of the latest issue

var time_do_download_each = 1500; // Do not lower this very much or you could end up crashing your browser

for (i = latest; i >= 0; i--) {
    types.forEach(function(type) {
        if (i < 112 && type != 'pdf') {
            // Skip Mobi & Epub for old issues
            return;
        } else {
            var tmp = i;
            // Otherwise downloads it
            var t = setTimeout(function() {
                window.open(base_url+type+'?'+tmp);
            }, time_do_download_each * tmp);
        }
    })
}


Tag: ,