This is an extract from the dfengine 1.05 source code. 2009-03-07 (Cyril Gantin) ----- Integration of libcurl for requesting maps from an online repository. Usage: /download Cvar dl_source defines the url from which to query maps, eg: http://someserver/somescript.php?q=%m The %m token is replaced with the actual map name in the query. The server MUST return an appropriate content-type. Accepted content-type values are either application/zip or application/octet-stream. Other content-type values will be treated as errors or queries that didn't yield results. The server MAY return a content-disposition header with the actual name of the pk3 file. In the absence of a content-disposition header, the client will write the pack to a default .pk3 location. The filename MUST have a pk3 extension. The filename MUST NOT have directory path information - slashes (/), backslashes (\) and colons (:) are not accepted. Finally the filename MUST consist of us-ascii characters only (chars 32 to 126, included). A filename that doesn't comply to these specifications will raise an error and abort the transfer. The server MAY redirect the query to another url. Multiple redirections are permitted - limit depends on libcurl's default settings. The end query MUST return a "200 OK" http status code. It is desirable that the server returns a content-length header with the size of the pk3 file. The server MAY return a custom x-dfengine-motd header. Its value is a string that MUST NOT exceed 127 chars. The x-dfengine-motd string will be displayed after the download is complete. This is the place where you take credits for setting up a server. :) Downloaded files are written to the current gamedir of the home directory - eg. C:\quake3\mymod\ in windows; ~/.q3a/mymod/ in linux. Name collision with an existing pk3 file will result in a failure and be left to the user to sort out. -----