Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Parse https://wiki.ubuntu.com/Releases into array/json PHP
{
"current": [
{
"version": "Ubuntu 17.10",
"codename": "Artful Aardvark",
"release_date": "October 19, 2017",
"end_of_life": "July 2018",
"links": [
"https://wiki.ubuntu.com/ArtfulAardvark",
"https://wiki.ubuntu.com/ArtfulAardvark/ReleaseNotes",
"https://lists.ubuntu.com/archives/ubuntu-announce/2017-October/000226.html",
null
]
},
{
"version": "Ubuntu 16.04.3 LTS",
"codename": "Xenial Xerus",
"release_date": "August 3, 2017",
"end_of_life": "April 2021",
"links": [
"https://wiki.ubuntu.com/XenialXerus",
"https://wiki.ubuntu.com/XenialXerus/ReleaseNotes/ChangeSummary/16.04.3",
"https://lists.ubuntu.com/archives/ubuntu-announce/2017-August/000224.html",
"https://lists.ubuntu.com/archives/ubuntu-announce/2016-April/000207.html"
]
},
{
"version": "Ubuntu 16.04.2 LTS",
"codename": "Xenial Xerus",
"release_date": "February 16, 2017",
"end_of_life": "April 2021",
"links": [
"https://wiki.ubuntu.com/XenialXerus",
"https://wiki.ubuntu.com/XenialXerus/ReleaseNotes/ChangeSummary/16.04.2",
"https://lists.ubuntu.com/archives/ubuntu-release/2017-February/004036.html",
"https://lists.ubuntu.com/archives/ubuntu-announce/2016-April/000207.html"
]
},
{
"version": "Ubuntu 16.04.1 LTS",
"codename": "Xenial Xerus",
"release_date": "July 21, 2016",
"end_of_life": "April 2021",
"links": [
"https://wiki.ubuntu.com/XenialXerus",
"https://wiki.ubuntu.com/XenialXerus/ReleaseNotes/ChangeSummary/16.04.1",
"https://lists.ubuntu.com/archives/ubuntu-announce/2016-July/000209.html",
"https://lists.ubuntu.com/archives/ubuntu-announce/2016-April/000207.html"
]
},
{
"version": "Ubuntu 16.04 LTS",
"codename": "Xenial Xerus",
"release_date": "April 21, 2016",
"end_of_life": "April 2021",
"links": [
"https://wiki.ubuntu.com/XenialXerus",
"https://wiki.ubuntu.com/XenialXerus/ReleaseNotes",
"https://lists.ubuntu.com/archives/ubuntu-announce/2016-April/000207.html",
"https://lists.ubuntu.com/archives/ubuntu-announce/2016-April/000207.html"
]
},
{
"version": "Ubuntu 14.04.5 LTS",
"codename": "Trusty Tahr",
"release_date": "August 4, 2016",
"end_of_life": "April 2019",
"links": [
"https://wiki.ubuntu.com/TrustyTahr",
"https://wiki.ubuntu.com/TrustyTahr/ReleaseNotes/ChangeSummary/14.04.5",
"https://lists.ubuntu.com/archives/ubuntu-announce/2016-August/000211.html",
"https://lists.ubuntu.com/archives/ubuntu-announce/2014-April/000182.html"
]
},
{
"version": "Ubuntu 14.04.4 LTS",
"codename": "Trusty Tahr",
"release_date": "February 18, 2016",
"end_of_life": "HWE August 2016",
"links": [
"https://wiki.ubuntu.com/TrustyTahr",
"https://wiki.ubuntu.com/TrustyTahr/ReleaseNotes/ChangeSummary/14.04.4",
"https://lists.ubuntu.com/archives/ubuntu-announce/2016-February/000205.html",
"https://wiki.ubuntu.com/Kernel/LTSEnablementStack#Kernel.2BAC8-Support.A14.04.x_Ubuntu_Kernel_Support"
]
},
{
"version": "Ubuntu 14.04.3 LTS",
"codename": "Trusty Tahr",
"release_date": "August 6, 2015",
"end_of_life": "HWE August 2016",
"links": [
"https://wiki.ubuntu.com/TrustyTahr",
"https://wiki.ubuntu.com/TrustyTahr/ReleaseNotes/ChangeSummary/14.04.3",
"https://lists.ubuntu.com/archives/ubuntu-announce/2015-August/000200.html",
"https://wiki.ubuntu.com/Kernel/LTSEnablementStack#Kernel.2BAC8-Support.A14.04.x_Ubuntu_Kernel_Support"
]
},
{
"version": "Ubuntu 14.04.2 LTS",
"codename": "Trusty Tahr",
"release_date": "February 20, 2015",
"end_of_life": "HWE August 2016",
"links": [
"https://wiki.ubuntu.com/TrustyTahr",
"https://wiki.ubuntu.com/TrustyTahr/ReleaseNotes/ChangeSummary/14.04.2",
"https://lists.ubuntu.com/archives/ubuntu-announce/2015-February/000192.html",
"https://wiki.ubuntu.com/Kernel/LTSEnablementStack#Kernel.2BAC8-Support.A14.04.x_Ubuntu_Kernel_Support"
]
},
{
"version": "Ubuntu 14.04.1 LTS",
"codename": "Trusty Tahr",
"release_date": "July 24, 2014",
"end_of_life": "April 2019",
"links": [
"https://wiki.ubuntu.com/TrustyTahr",
"https://wiki.ubuntu.com/TrustyTahr/ReleaseNotes/ChangeSummary/14.04.1",
"https://lists.ubuntu.com/archives/ubuntu-announce/2014-July/000188.html",
"https://lists.ubuntu.com/archives/ubuntu-announce/2014-April/000182.html"
]
},
{
"version": "Ubuntu 14.04 LTS",
"codename": "Trusty Tahr",
"release_date": "April 17, 2014",
"end_of_life": "April 2019",
"links": [
"https://wiki.ubuntu.com/TrustyTahr",
"https://wiki.ubuntu.com/TrustyTahr/ReleaseNotes",
"https://lists.ubuntu.com/archives/ubuntu-announce/2014-April/000182.html",
"https://lists.ubuntu.com/archives/ubuntu-announce/2014-April/000182.html"
]
}
],
"future": [
{
"version": "Ubuntu 18.04 LTS",
"codename": "Bionic Beaver",
"release_date": "April 2018",
"end_of_life": "",
"links": [
"https://wiki.ubuntu.com/BionicBeaver",
null,
null,
null
]
}
],
"end_of_life": [
{
"version": "Ubuntu 17.04",
"codename": "Zesty Zapus",
"release_date": "April 13, 2017",
"end_of_life": "January 13, 2018",
"links": [
"https://wiki.ubuntu.com/ZestyZapus",
"https://wiki.ubuntu.com/ZestyZapus/ReleaseNotes",
"https://lists.ubuntu.com/archives/ubuntu-announce/2017-April/000220.html",
"https://lists.ubuntu.com/archives/ubuntu-announce/2018-January/000227.html"
]
},
{
"version": "Ubuntu 16.10",
"codename": "Yakkety Yak",
"release_date": "October 13, 2016",
"end_of_life": "July 20, 2017",
"links": [
"https://wiki.ubuntu.com/YakketyYak",
"https://wiki.ubuntu.com/YakketyYak/ReleaseNotes",
"https://lists.ubuntu.com/archives/ubuntu-announce/2016-October/000213.html",
"https://lists.ubuntu.com/archives/ubuntu-announce/2017-July/000223.html"
]
},
{
"version": "Ubuntu 15.10",
"codename": "Wily Werewolf",
"release_date": "October 22, 2015",
"end_of_life": "July 28, 2016",
"links": [
"https://wiki.ubuntu.com/WilyWerewolf",
"https://wiki.ubuntu.com/WilyWerewolf/ReleaseNotes",
"https://lists.ubuntu.com/archives/ubuntu-announce/2015-October/000202.html",
"https://lists.ubuntu.com/archives/ubuntu-announce/2016-July/000210.html"
]
},
{
"version": "Ubuntu 15.04",
"codename": "Vivid Vervet",
"release_date": "April 23, 2015",
"end_of_life": "February 4, 2016",
"links": [
"https://wiki.ubuntu.com/VividVervet",
"https://wiki.ubuntu.com/VividVervet/ReleaseNotes",
"https://lists.ubuntu.com/archives/ubuntu-announce/2015-April/000195.html",
"https://lists.ubuntu.com/archives/ubuntu-announce/2016-January/000203.html"
]
},
{
"version": "Ubuntu 14.10",
"codename": "Utopic Unicorn",
"release_date": "October 23, 2014",
"end_of_life": "July 23, 2015",
"links": [
"https://wiki.ubuntu.com/UtopicUnicorn",
"https://wiki.ubuntu.com/UtopicUnicorn/ReleaseNotes",
"https://lists.ubuntu.com/archives/ubuntu-announce/2014-October/000191.html",
"https://lists.ubuntu.com/archives/ubuntu-announce/2015-July/000197.html"
]
},
{
"version": "Ubuntu 13.10",
"codename": "Saucy Salamander",
"release_date": "October 17, 2013",
"end_of_life": "July 17, 2014",
"links": [
"https://wiki.ubuntu.com/SaucySalamander",
"https://wiki.ubuntu.com/SaucySalamander/ReleaseNotes",
"https://lists.ubuntu.com/archives/ubuntu-announce/2013-October/000177.html",
"https://lists.ubuntu.com/archives/ubuntu-announce/2014-June/000185.html"
]
},
{
"version": "Ubuntu 13.04",
"codename": "Raring Ringtail",
"release_date": "April 25, 2013",
"end_of_life": "January 27, 2014",
"links": [
"https://wiki.ubuntu.com/RaringRingtail",
"https://wiki.ubuntu.com/RaringRingtail/ReleaseNotes",
"https://lists.ubuntu.com/archives/ubuntu-announce/2013-April/000171.html",
"https://lists.ubuntu.com/archives/ubuntu-announce/2014-January/000178.html"
]
},
{
"version": "Ubuntu 12.10",
"codename": "Quantal Quetzal",
"release_date": "October 18, 2012",
"end_of_life": "May 16, 2014",
"links": [
"https://wiki.ubuntu.com/QuantalQuetzal",
"https://wiki.ubuntu.com/QuantalQuetzal/TechnicalOverview",
"https://lists.ubuntu.com/archives/ubuntu-announce/2010-October/000164.html",
"https://lists.ubuntu.com/archives/ubuntu-security-announce/2014-April/002488.html"
]
},
{
"version": "Ubuntu 12.04.5 LTS",
"codename": "Precise Pangolin",
"release_date": "August 7, 2014",
"end_of_life": "April 28, 2017",
"links": [
"https://wiki.ubuntu.com/PrecisePangolin",
"https://wiki.ubuntu.com/PrecisePangolin/ReleaseNotes/ChangeSummary/12.04.5",
"https://lists.ubuntu.com/archives/ubuntu-announce/2014-August/000189.html",
"https://lists.ubuntu.com/archives/ubuntu-announce/2017-March/000218.html"
]
},
{
"version": "Ubuntu 12.04.4 LTS",
"codename": "Precise Pangolin",
"release_date": "February 6, 2014",
"end_of_life": "HWE August 8, 2014",
"links": [
"https://wiki.ubuntu.com/PrecisePangolin",
"https://wiki.ubuntu.com/PrecisePangolin/ReleaseNotes/ChangeSummary/12.04.4",
"https://lists.ubuntu.com/archives/ubuntu-announce/2014-February/000180.html",
"https://wiki.ubuntu.com/1204_HWE_EOL"
]
},
{
"version": "Ubuntu 12.04.3 LTS",
"codename": "Precise Pangolin",
"release_date": "August 23, 2013",
"end_of_life": "HWE August 8, 2014",
"links": [
"https://wiki.ubuntu.com/PrecisePangolin",
"https://wiki.ubuntu.com/PrecisePangolin/ReleaseNotes/ChangeSummary/12.04.3",
"https://lists.ubuntu.com/archives/ubuntu-announce/2013-August/000175.html",
"https://wiki.ubuntu.com/1204_HWE_EOL"
]
},
{
"version": "Ubuntu 12.04.2 LTS",
"codename": "Precise Pangolin",
"release_date": "February 14, 2013",
"end_of_life": "HWE August 8, 2014",
"links": [
"https://wiki.ubuntu.com/PrecisePangolin",
"https://wiki.ubuntu.com/PrecisePangolin/ReleaseNotes/ChangeSummary/12.04.2",
"https://lists.ubuntu.com/archives/ubuntu-announce/2013-February/000166.html",
"https://wiki.ubuntu.com/1204_HWE_EOL"
]
},
{
"version": "Ubuntu 12.04.1 LTS",
"codename": "Precise Pangolin",
"release_date": "August 24, 2012",
"end_of_life": "April 28, 2017",
"links": [
"https://wiki.ubuntu.com/PrecisePangolin",
"https://wiki.ubuntu.com/PrecisePangolin/ReleaseNotes/ChangeSummary/12.04.1",
"https://lists.ubuntu.com/archives/ubuntu-announce/2012-August/000160.html",
"https://lists.ubuntu.com/archives/ubuntu-announce/2017-March/000218.html"
]
},
{
"version": "Ubuntu 12.04 LTS",
"codename": "Precise Pangolin",
"release_date": "April 26, 2012",
"end_of_life": "April 28, 2017",
"links": [
"https://wiki.ubuntu.com/PrecisePangolin",
"https://wiki.ubuntu.com/PrecisePangolin/TechnicalOverview",
"https://lists.ubuntu.com/archives/ubuntu-announce/2012-April/000159.html",
"https://lists.ubuntu.com/archives/ubuntu-announce/2017-March/000218.html"
]
},
{
"version": "Ubuntu 11.10",
"codename": "Oneiric Ocelot",
"release_date": "October 13, 2011",
"end_of_life": "May 9, 2013",
"links": [
"https://wiki.ubuntu.com/OneiricOcelot",
"https://wiki.ubuntu.com/OneiricOcelot/TechnicalOverview",
"https://lists.ubuntu.com/archives/ubuntu-announce/2011-October/000153.html",
"https://lists.ubuntu.com/archives/ubuntu-announce/2013-March/000167.html"
]
},
{
"version": "Ubuntu 11.04",
"codename": "Natty Narwhal",
"release_date": "April 28, 2011",
"end_of_life": "October 28, 2012",
"links": [
"https://wiki.ubuntu.com/NattyNarwhal",
"https://wiki.ubuntu.com/NattyNarwhal/TechnicalOverview",
"https://lists.ubuntu.com/archives/ubuntu-announce/2011-April/000147.html",
"https://lists.ubuntu.com/archives/ubuntu-announce/2012-October/000165.html"
]
},
{
"version": "Ubuntu 10.10",
"codename": "Maverick Meerkat",
"release_date": "October 10, 2010",
"end_of_life": "April 10, 2012",
"links": [
"https://wiki.ubuntu.com/MaverickMeerkat",
"https://wiki.ubuntu.com/MaverickMeerkat/TechnicalOverview",
"https://lists.ubuntu.com/archives/ubuntu-announce/2010-October/000139.html",
"https://lists.ubuntu.com/archives/ubuntu-announce/2012-April/000158.html"
]
},
{
"version": "Ubuntu 10.04.4 LTS",
"codename": "Lucid Lynx",
"release_date": "February 16, 2012",
"end_of_life": "May 9, 2013 (Desktop)April 30, 2015 (Server)",
"links": [
"https://wiki.ubuntu.com/LucidLynx",
"https://wiki.ubuntu.com/LucidLynx/ReleaseNotes/ChangeSummary/10.04.4",
"https://lists.ubuntu.com/archives/ubuntu-announce/2012-February/000155.html",
"https://lists.ubuntu.com/archives/ubuntu-announce/2013-March/000169.html"
]
},
{
"version": "Ubuntu 10.04.3 LTS",
"codename": "Lucid Lynx",
"release_date": "July 21, 2011",
"end_of_life": "",
"links": [
"https://wiki.ubuntu.com/LucidLynx",
"https://wiki.ubuntu.com/LucidLynx/ReleaseNotes/ChangeSummary/10.04.3",
"https://lists.ubuntu.com/archives/ubuntu-announce/2011-July/000150.html",
null
]
},
{
"version": "Ubuntu 10.04.2 LTS",
"codename": "Lucid Lynx",
"release_date": "February 18, 2011",
"end_of_life": "",
"links": [
"https://wiki.ubuntu.com/LucidLynx",
"https://wiki.ubuntu.com/LucidLynx/ReleaseNotes/ChangeSummary/10.04.2",
"https://lists.ubuntu.com/archives/ubuntu-announce/2011-February/000141.html",
null
]
},
{
"version": "Ubuntu 10.04.1 LTS",
"codename": "Lucid Lynx",
"release_date": "August 17, 2010",
"end_of_life": "",
"links": [
"https://wiki.ubuntu.com/LucidLynx",
"https://wiki.ubuntu.com/LucidLynx/ReleaseNotes/ChangeSummary/10.04.1",
"https://lists.ubuntu.com/archives/ubuntu-announce/2010-August/000134.html",
null
]
},
{
"version": "Ubuntu 10.04 LTS",
"codename": "Lucid Lynx",
"release_date": "April 29, 2010",
"end_of_life": "",
"links": [
"https://wiki.ubuntu.com/LucidLynx",
"https://wiki.ubuntu.com/LucidLynx/TechnicalOverview",
"https://lists.ubuntu.com/archives/ubuntu-announce/2010-April/000133.html",
null
]
},
{
"version": "Ubuntu 10.04",
"codename": "Lucid Lynx (Desktop)",
"release_date": "February 16, 2012",
"end_of_life": "May 9, 2013",
"links": [
"https://wiki.ubuntu.com/LucidLynx",
"https://wiki.ubuntu.com/LucidLynx/ReleaseNotes/ChangeSummary/10.04.4",
"https://lists.ubuntu.com/archives/ubuntu-announce/2012-February/000155.html",
"https://lists.ubuntu.com/archives/ubuntu-announce/2013-March/000169.html"
]
},
{
"version": "Ubuntu 9.10",
"codename": "Karmic Koala",
"release_date": "October 29, 2009",
"end_of_life": "April 30, 2011",
"links": [
"https://wiki.ubuntu.com/KarmicKoala",
"https://wiki.ubuntu.com/KarmicKoala/TechnicalOverview",
"https://lists.ubuntu.com/archives/ubuntu-announce/2009-October/000127.html",
"https://lists.ubuntu.com/archives/ubuntu-announce/2011-March/000142.html"
]
},
{
"version": "Ubuntu 9.04",
"codename": "Jaunty Jackalope",
"release_date": "April 23, 2009",
"end_of_life": "October 23, 2010",
"links": [
"https://wiki.ubuntu.com/JauntyJackalope",
"https://wiki.ubuntu.com/JauntyJackalope/TechnicalOverview",
"https://lists.ubuntu.com/archives/ubuntu-announce/2009-April/000122.html",
"https://lists.ubuntu.com/archives/ubuntu-announce/2010-September/000137.html"
]
},
{
"version": "Ubuntu 8.10",
"codename": "Intrepid Ibex",
"release_date": "October 30, 2008",
"end_of_life": "April 30, 2010",
"links": [
"https://wiki.ubuntu.com/IntrepidIbex",
"https://wiki.ubuntu.com/IntrepidReleaseNotes",
"https://lists.ubuntu.com/archives/ubuntu-announce/2008-October/000116.html",
"https://lists.ubuntu.com/archives/ubuntu-announce/2010-March/000130.html"
]
},
{
"version": "Ubuntu 8.04.4 LTS",
"codename": "Hardy Heron (Server)",
"release_date": "January 28, 2010",
"end_of_life": "May 9, 2013",
"links": [
"https://wiki.ubuntu.com/HardyHeron",
"https://wiki.ubuntu.com/HardyReleaseNotes/ChangeSummary/8.04.4",
"https://lists.ubuntu.com/archives/ubuntu-announce/2010-January/000128.html",
"https://lists.ubuntu.com/archives/ubuntu-announce/2013-March/000168.html"
]
},
{
"version": "Ubuntu 8.04.3 LTS",
"codename": "Hardy Heron",
"release_date": "July 16, 2009",
"end_of_life": "",
"links": [
"https://wiki.ubuntu.com/HardyHeron",
"https://wiki.ubuntu.com/HardyReleaseNotes/ChangeSummary/8.04.3",
"https://lists.ubuntu.com/archives/ubuntu-announce/2009-July/000124.html",
null
]
},
{
"version": "Ubuntu 8.04.2 LTS",
"codename": "Hardy Heron",
"release_date": "January 22, 2009",
"end_of_life": "",
"links": [
"https://wiki.ubuntu.com/HardyHeron",
"https://wiki.ubuntu.com/HardyReleaseNotes/ChangeSummary/8.04.2",
"https://lists.ubuntu.com/archives/ubuntu-announce/2009-January/000117.html",
null
]
},
{
"version": "Ubuntu 8.04.1 LTS",
"codename": "Hardy Heron",
"release_date": "July 3, 2008",
"end_of_life": "",
"links": [
"https://wiki.ubuntu.com/HardyHeron",
"https://wiki.ubuntu.com/HardyHeron",
"https://lists.ubuntu.com/archives/ubuntu-announce/2008-July/000112.html",
null
]
},
{
"version": "Ubuntu 8.04 LTS",
"codename": "Hardy Heron",
"release_date": "April 24, 2008",
"end_of_life": "",
"links": [
"https://wiki.ubuntu.com/HardyHeron",
"https://wiki.ubuntu.com/HardyHeron",
"https://lists.ubuntu.com/archives/ubuntu-announce/2008-April/000111.html",
null
]
},
{
"version": "Ubuntu 8.04",
"codename": "Hardy Heron (Desktop)",
"release_date": "April 24, 2008",
"end_of_life": "May 12, 2011",
"links": [
"https://wiki.ubuntu.com/HardyHeron",
"https://wiki.ubuntu.com/HardyReleaseNotes",
"https://lists.ubuntu.com/archives/ubuntu-announce/2008-April/000111.html",
"https://lists.ubuntu.com/archives/ubuntu-announce/2011-April/000144.html"
]
},
{
"version": "Ubuntu 7.10",
"codename": "Gutsy Gibbon",
"release_date": "October 18, 2007",
"end_of_life": "April 18th, 2009",
"links": [
"https://wiki.ubuntu.com/GutsyGibbon",
"https://wiki.ubuntu.com/GutsyReleaseNotes",
"https://lists.ubuntu.com/archives/ubuntu-announce/2007-October/000105.html",
"http://www.ubuntu.com/news/ubuntu-7.10-eol"
]
},
{
"version": "Ubuntu 7.04",
"codename": "Feisty Fawn",
"release_date": "April 19, 2007",
"end_of_life": "October 19, 2008",
"links": [
"https://wiki.ubuntu.com/FeistyFawn",
"http://www.ubuntu.com/getubuntu/releasenotes/704",
"https://lists.ubuntu.com/archives/ubuntu-announce/2007-April/000102.html",
"https://lists.ubuntu.com/archives/ubuntu-announce/2008-September/000113.html"
]
},
{
"version": "Ubuntu 6.10",
"codename": "Edgy Eft",
"release_date": "October 26, 2006",
"end_of_life": "April 26, 2008",
"links": [
"https://wiki.ubuntu.com/EdgyEft",
null,
"https://lists.ubuntu.com/archives/ubuntu-announce/2006-October/000093.html",
"https://lists.ubuntu.com/archives/ubuntu-security-announce/2008-March/000680.html"
]
},
{
"version": "Ubuntu 6.06.2 LTS",
"codename": "Dapper Drake (Server)",
"release_date": "January 21, 2008",
"end_of_life": "June 1, 2011",
"links": [
"https://wiki.ubuntu.com/DapperDrake",
null,
"https://lists.ubuntu.com/archives/ubuntu-announce/2008-January/000107.html",
"https://lists.ubuntu.com/archives/ubuntu-announce/2011-June/000149.html"
]
},
{
"version": "Ubuntu 6.06.1 LTS",
"codename": "Dapper Drake",
"release_date": "August 10, 2006",
"end_of_life": "",
"links": [
"https://wiki.ubuntu.com/DapperDrake",
null,
"https://lists.ubuntu.com/archives/ubuntu-announce/2006-August/000088.html",
null
]
},
{
"version": "Ubuntu 6.06 LTS",
"codename": "Dapper Drake",
"release_date": "June 1, 2006",
"end_of_life": "",
"links": [
"https://wiki.ubuntu.com/DapperDrake",
"https://wiki.ubuntu.com/DapperReleaseNotes",
"https://lists.ubuntu.com/archives/ubuntu-announce/2006-June/000083.html",
null
]
},
{
"version": "Ubuntu 6.06",
"codename": "Dapper Drake (Desktop)",
"release_date": "June 1, 2006",
"end_of_life": "July 14, 2009",
"links": [
"https://wiki.ubuntu.com/DapperDrake",
"https://wiki.ubuntu.com/DapperReleaseNotes",
"https://lists.ubuntu.com/archives/ubuntu-announce/2006-June/000083.html",
"https://lists.ubuntu.com/archives/ubuntu-announce/2009-July/000123.html"
]
},
{
"version": "Ubuntu 5.10",
"codename": "Breezy Badger",
"release_date": "October 12, 2005",
"end_of_life": "April 13, 2007",
"links": [
"https://wiki.ubuntu.com/BreezyBadger",
"http://www.ubuntu.com/getubuntu/releasenotes/510",
"https://lists.ubuntu.com/archives/ubuntu-announce/2005-October/000038.html",
"https://lists.ubuntu.com/archives/ubuntu-security-announce/2007-March/000504.html"
]
},
{
"version": "Ubuntu 5.04",
"codename": "Hoary Hedgehog",
"release_date": "April 8, 2005",
"end_of_life": "October 31, 2006",
"links": [
"https://wiki.ubuntu.com/HoaryHedgehog",
null,
"https://lists.ubuntu.com/archives/ubuntu-announce/2005-April/000023.html",
"https://lists.ubuntu.com/archives/ubuntu-security-announce/2006-October/000418.html"
]
},
{
"version": "Ubuntu 4.10",
"codename": "Warty Warthog",
"release_date": "October 26, 2004",
"end_of_life": "April 30, 2006",
"links": [
"https://wiki.ubuntu.com/WartyWarthog",
null,
"https://lists.ubuntu.com/archives/ubuntu-announce/2004-October/000003.html",
"https://lists.ubuntu.com/archives/ubuntu-announce/2006-March/000061.html"
]
}
]
}
<?php
/**
* Parse https://wiki.ubuntu.com/Releases into array/json
*/
$dom = new \DOMDocument;
libxml_use_internal_errors(true);
$dom->loadHtml(file_get_contents('https://wiki.ubuntu.com/Releases'));
$xpath = new \DOMXPath($dom);
$tables = $xpath->query("//*[@id=\"content\"]/*/table/tbody/tr");
$result = [];
$sections = ['current', 'future', 'end_of_life'];
foreach ($tables as $table) {
$td = $table->getElementsByTagName('td');
if ($td->item(0)->nodeValue == 'Version') {
$section = array_shift($sections);
continue;
}
$links = [];
for ($i = 1; $i <= 4; $i++) {
$link = $td->item($i)->getElementsByTagName('a');
if ($link->length > 0) {
$link = $link->item(0)->getAttribute('href');
if (substr($link, 0, 1) == '/') {
$link = 'https://wiki.ubuntu.com'.$link;
}
$links[] = $link;
} else {
$links[] = null;
}
}
$result[$section][] = [
'version' => trim($td->item(0)->nodeValue),
'codename' => trim($td->item(1)->nodeValue),
'release_date' => trim($td->item(3)->nodeValue),
'end_of_life' => trim($td->item(4)->nodeValue),
'links' => $links,
];
}
header('Content-type: application/json;charset=utf-8;');
echo json_encode($result, JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.