PDA

View Full Version : A programmatic way to get a list of (or latest) HoN versions?



arex1337
12-23-2010, 07:19 AM
Hey.

I'm making a HoN mod website (read more here (http://forums.heroesofnewerth.com/showthread.php?t=196249)) and would like to grab a list of HoN versions. It's important that the list is updated instantly when a new version comes out, since I'm going to use it for showing mod compatibility.

(Of course, alternatively I can build a list like this myself if there is a programmatic way to only get the latest version.)

Ideas?

Didldak
12-23-2010, 07:22 AM
edit: misunderstood

Xzarr
12-23-2010, 07:26 AM
http://masterserver.hon.s2games.com/patcher/patcher.php

Used to work, you could try faking being a hon client I guess

wolf1oo
12-23-2010, 01:28 PM
Not used to work, does work. You just have to send the correct client info. A packet dump of the HoN client reveals that HoN includes this POST data:
version=0.0.0.0&os=lac&arch=x86-biarch
This data is, I believe, actually not necessary. The reason that the patcher script no longer works is the same reason all of the scripts no longer work through a browser, and that is because HoN recently, just before v2.0 came out, changed all of these php scripts so that the User-Agent of the request must be of the form:
User-Agent: S2 Games/Heroes of Newerth/[version]/lac/x86-biarch
So, currently, the acceptable user-agent is:
User-Agent: S2 Games/Heroes of Newerth/2.0.4.2/lac/x86-biarch

I have found that right now it accepts any user-agent that is v2.0 or later.

I hope this helps!

P.S. Using PHP, you can easily accomplish making a request to their server using cUrl.

arex1337
12-25-2010, 07:08 AM
Excellent! And btw, I'm live tweeting the development of honmods.org. See http://forums.heroesofnewerth.com/showthread.php?p=12800425