icza / screp

StarCraft - Brood War replay parser
Apache License 2.0
80 stars 21 forks source link

Screp for PHP #21

Closed nort-jamz closed 2 years ago

nort-jamz commented 4 years ago

Hi Icza. I am trying to make a small PHP application that allows me to print the all player names of the modern replays (1.21). I have been trying to create this simple application for several days. But I can't unpack any modern replay. I understand that this replays are in ZLIB format. but i'm pretty lost... Could you help me?

icza commented 4 years ago

It's true that ZLIB might be used in internal sections of modern replays, but it's not just one ZLIB block.

See the repparser.go and repdecoder.go files how it is structured and parsed.

Alternatively you may use the screp binary release to call it as an external tool, it parses the replay file passed as an argument to it, and it returns the data as JSON which your PHP code can parse and use.

nort-jamz commented 4 years ago

I has been analyzing these files. I have a basic-intermediate programming level and seeing all that code I easily get lost. I was learning a little of Golang language. however my PHP hosting does not allow to starting Go applications. I will continue to analyze the code. But I find it quite overwhelming.

crustamet commented 3 years ago

where is the binary ? please i have searched like crazy found nothing :(

icza commented 3 years ago

What binary? The screp binary? Go to the Releases page: https://github.com/icza/screp/releases

And download the one for your platform.