dohgames.com

[Archived from my old blog]
Saturday, October 16, 2010

dohgames.com

A couple years ago I was downloading a few mame roms from a site called dohgames, I wasn’t happy with the the download system in place, it meant too much waiting and clicking just to get a single rom. So I dissembled the site, and wrote a script to download the games much faster.

It’s sloppy and could be cleaned up a bit, but it worked and was all I really needed.

As usual I began by deconstruction of the url;
http://www.dohgames.com/roms/download.php?id=148&sys=mame

The website the files were hosted on.
http://www.dohgames.com

The Directory where the files were stored.
/roms/

The php script that managed the downloads.
download.php?

Open in Notepad or another text editor to see how it works, and what files & directories it calls to.

The id of the Rom I was downloading.
id=148

The System of the Rom I was downloading, in this case Mame.
&sys=mame

I then did a few simple tests to findout just how many id’s were in the data base.
In this case I found that an id of 1 – 5169 worked.

Example:
http://www.dohgames.com/roms/download.php?id=5169&sys=mame

A quick wget string will fetch the file:

wget -nd -p -np -t2 -k -a default.log -nv -A.zip,.exe,.rar,*mame* “http://www.dohgames.com/roms/download.php?id=5169&sys=mame”

Now to download them all just use a variable in place of the url and have a list of all urls you want to download contained within a text file.

dohgames.com has sadly closed it doors after 6 years of service, but the same method used in this post can be applied to other sites.

I’ve used it successfully on a few sites, though some more complex then others due to security measures in place.

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s