Latest Uploads
Extraterre ... .0.1 (zip)

dantheman363

Monty Teas ... Screenie 1

steve_ancell

Santa Clau ... ed his bag

waroffice

manic_platdude.png

spinal

Tetris Clone

steve_ancell

Super blues bros.

spinal

Code Snippets > Internet ( Created 12 February 2012 | Last Edited 12 February 2012)

Patcher by Afr0 | No Votes
Are you writing an MMO? Use this to patch clients!
Written in
PHP
Took me about 5 hours (I think) to write this. Would have been faster if I could have figured out how to get echo() to work properly without having to comment out code to do it.
For the Unix-version of this script, see below!

-->

The script depends on a function I found by Googling it (because I was lazy). It didn't come with a license, but if you're putting this into a closed source application, you'd better contact the author.

-->

Clients use this by simply connecting to http://www.mywebserver.com/patch.php?Version=ClientVersion

This script will then automatically send a new manifest if one existed, or the two newest ones if the newest one depends on an earlier patch. The client will then have to check if the last oldest manifest received in the zipped file has a child that is newer than the client's version, and request it (I'll be writing a separate script for requesting specific manifests).

Here's some example code showing how a client should use this:

-->

Unix-version

-->

Latest Comments

Posted : Sunday, 12 February 2012, 06:05
Afr0


Thanks to Jay for the idea for this script!

Posted : Sunday, 12 February 2012, 14:56
Afr0


I realized that since this script will only send the first manifest it can find that is newer than a client's version, there's a possibility that there are newer versions than the one the client received.
Therefore I added the ability to specify a parent in a manifest. If this script finds a parent in the newest manifest, it'll zip it along with the one it found and send it.
Then the client has to check if the newest manifest has a parent specified, in which case it should fetch that as well.

In case it isn't obvious from the script, a manifest's syntax is as follows:

-->

Latest Posts
Sidewalk Skiing
Jayenkai Sat 14:57
Musical Tastes
Dabz Sat 11:38
FIRST!!!
steve_ancell Sat 11:22
Coder's Block
Jayenkai Thu 09:01
Consumer Lockout
9572AD Thu 06:09
Professor Oak, Honest!!
spinal Wed 23:24
Position in Mind
steve_ancell Wed 20:11
Sonic Adventure v0.x
Jayenkai Wed 07:08
Noel's Graduation
waroffice Wed 02:55
Monkey vs iOS tweaks
spinal Tue 22:51
More

Latest Items
News : Newsletter #176
Jayenkai Sat 04:49
News : Newsletter #175
Dabz Tue 09:38
Blog : Snow: More Material Junk
Cower Sat 23:17
Dev-Diary : Mutant Monty: Amstrad CPC to Windows conversion
rockford Fri 13:14
Techy : AppleTV
Jayenkai Thu 09:40
Blog : Graphviz
steve_ancell Sat 14:17
Pets : Top-Down Shadow Hack
Jayenkai Tue 05:52
Snippet : JNKrunch v1.0
Jayenkai Sat 07:20
News : Newsletter #173
waroffice Fri 04:47
Blog : Material Loading
Cower Fri 02:08
Pets : I Done Won A Thing
shroom_monk Sun 11:31
Pets : Repurposing A Lexer
Cower Mon 22:06
Bah : Feeling a Little Angry
spinal Mon 11:26
News : Newsletter #170
Dabz Sat 00:34
Showcase : sbfgen
Cower Sat 16:57
More

Who's Online
steve_ancell
Sat, at 21:49
blanko1324
Sat, at 20:33
9572AD
Sat, at 19:18
Evil Roy Ferguson
Sat, at 19:12
therevillsgames
Sat, at 19:08
CodersRule
Sat, at 18:37
dna
Sat, at 18:05
Cower
Sat, at 17:39
Jayenkai
Sat, at 16:33
shroom_monk
Sat, at 16:29
Link to this page
Site : Jayenkai 2006-Infinity |
MudChat's origins, BBCode's former life, Image Scaler.