View Full Version : A programmatic way to get a list of (or latest) HoN versions?
12-23-2010, 08:19 AM
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.)
12-23-2010, 08:22 AM
12-23-2010, 08:26 AM
Used to work, you could try faking being a hon client I guess
12-23-2010, 02: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:
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/188.8.131.52/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.
12-25-2010, 08:08 AM
Excellent! And btw, I'm live tweeting the development of honmods.org. See http://forums.heroesofnewerth.com/showthread.php?p=12800425