[Phpsysinfo-subversion] SF.net SVN: phpsysinfo:[614] trunk
Brought to you by:
namiltd
From: <jac...@us...> - 2012-07-28 09:03:05
|
Revision: 614 http://phpsysinfo.svn.sourceforge.net/phpsysinfo/?rev=614&view=rev Author: jacky672 Date: 2012-07-28 09:02:59 +0000 (Sat, 28 Jul 2012) Log Message: ----------- [ADD] JSON output support (xml.php?json) Modified Paths: -------------- trunk/ChangeLog trunk/README trunk/xml.php Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2012-07-25 18:28:26 UTC (rev 613) +++ trunk/ChangeLog 2012-07-28 09:02:59 UTC (rev 614) @@ -1,7 +1,8 @@ $Id$ phpSysInfo 3.0.19 - + + - [ADD] JSON output support (xml.php?json) - [ADD] Partial support of Minix - [ADD] Added Greek language (gr) Modified: trunk/README =================================================================== --- trunk/README 2012-07-25 18:28:26 UTC (rev 613) +++ trunk/README 2012-07-28 09:02:59 UTC (rev 614) @@ -3,8 +3,9 @@ Copyright (c), 1999-2008, Uriah Welcome (pre...@us...) Copyright (c), 1999-2009, Michael Cramer (big...@us...) Copyright (c), 2007-2008, Audun Larsen (xq...@us...) -Copyright (c), 2007-2011, Erkan Valentin (jac...@us...) -Copyright (c), 2009-2011, Mieczyslaw Nalewaj (na...@us...) +Copyright (c), 2007-2012, Erkan Valentin (jac...@us...) +Copyright (c), 2009-2012, Mieczyslaw Nalewaj (na...@us...) +Copyright (c), 2010-2012, Damien Roth CURRENT TESTED PLATFORMS ------------------------ Modified: trunk/xml.php =================================================================== --- trunk/xml.php 2012-07-25 18:28:26 UTC (rev 613) +++ trunk/xml.php 2012-07-28 09:02:59 UTC (rev 614) @@ -35,13 +35,33 @@ $plugin = basename(htmlspecialchars($_GET['plugin'])); if ($plugin == "complete") { $output = new WebpageXML(true, null); - $output->run(); + + if(isset($_GET['json'])){ + $sxml = simplexml_load_string($output->getXMLString()); + echo json_encode($sxml); + } + else { + $output->run(); + } } elseif ($plugin != "") { $output = new WebpageXML(false, $plugin); - $output->run(); + if(isset($_GET['json'])){ + $sxml = simplexml_load_string($output->getXMLString()); + echo json_encode($sxml); + } + else { + $output->run(); + } } } else { $output = new WebpageXML(false, null); - $output->run(); + + if(isset($_GET['json'])){ + $sxml = simplexml_load_string($output->getXMLString()); + echo json_encode($sxml); + } + else { + $output->run(); + } } ?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |