Gotcha..

I made a file called “mw-version.php file in /var/www/html/ with the following 
php:
<?php
$url = "https://en.wikipedia.org/w";;
$p = xml_parser_create();
xml_parse_into_struct($p, 
file_get_contents($url."/api.php?action=query&meta=siteinfo&siprop=extensions&format=xml"),
 $vals, $index);
xml_parser_free($p);
$i=0;
foreach($vals as $item) {
foreach(explode(",", var_export($item, true)) as $mytext) {
  if( (strstr($mytext,"'NAME'")) || (strstr($mytext,"'VERSION'")) ) {
   $mytext = str_replace("'","",$mytext);
   $mytext = str_replace("\n","",$mytext);
   $mytext = str_replace("NAME => ","",$mytext);
   $mytext = str_replace("    VERSION => "," = ",$mytext);
   print($mytext);
  }
}
$i++;print("<br/>\n".$i." - ");
}
?>


And it did essentially what I wanted

Thanks!



-Rich

_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l

Reply via email to