svn: /pear/ci/phpuc/trunk/ changes.php

From: Date: Mon, 20 Sep 2010 10:19:37 +0000
Subject: svn: /pear/ci/phpuc/trunk/ changes.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-60387@lists.php.net to get a copy of this message
clockwerx Mon, 20 Sep 2010 10:19:37 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=303612 Log: Added world's most horrible feeling pearweb scraping changelog finder Changed paths: A pear/ci/phpuc/trunk/changes.php Added: pear/ci/phpuc/trunk/changes.php =================================================================== --- pear/ci/phpuc/trunk/changes.php (rev 0) +++ pear/ci/phpuc/trunk/changes.php 2010-09-20 10:19:37 UTC (rev 303612) @@ -0,0 +1,27 @@ +<?php +if (empty($_SERVER['argv'][1])) { + die("php changes.php (packagename)"); +} +$package = $_SERVER['argv'][1]; + +$data = file_get_contents("http://pear.php.net/bugs/search.php?cmd=display&package_name[]=" . $package . "&status=CRSLR"); +$tidy = tidy_parse_string($data); +$tidy->cleanRepair(); + +$dom = new DOMDocument(); +@$dom->loadHTML((string)$tidy); + +$sxe = simplexml_import_dom($dom); + +function clean_html($match) { + $type = (string)$match->td[2]; + $id = (string)$match->td[0]->a[0]; + $title = (string)$match->td[7]; + $fixer = (string)$match->td[8]; + + return $type . " #" . $id . ' ' . $title . " - " . $fixer . "\n"; +} + +foreach ($sxe->xpath('//tr[@class="bug-result Csd"]') as $match) { + print clean_html($match); +}

« previous php.pear.cvs (#60387) next »