I am creating a .net application and I need to somehow find out the the version number of the latest stable release of WordPress.
Does anyone know if there is a way to get this?
Thanks
EDIT: I have just thought of a possible solution and will post here if pans out.
You should be able to do a HEAD against wordpress.org/latest.zip and parse the version number from the filename.
Here is an example:
This is taking advantage of the fact that WordPress.org sets the filename in the Content-Disposition HTTP header to include the version number. Obviously, if WordPress changes this behaviour, this method will break.
We can do a HTTP HEAD to avoid downloading the file, the headers are enough for this task.