Pastoid

<pre><?php $path = r

The page you are looking at now is at this URL: http://pastoid.com/aor

This paste was last updated on February 20, 2009 at 4:28 pm.

php coderaw

<pre><?php
$path = realpath('/var/www/htdocs/habari/trunk/3rdparty/plugins');
 
$objects = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path), RecursiveIteratorIterator::SELF_FIRST);
foreach($objects as $name => $object){
    if (preg_match('#^(.+)\.plugin\.php$#i', $name, $file)) {
    	echo "\n\n$name:\n";
    	$file = file_get_contents($name);
    	if(preg_match('#function\s+info\(\)\s*{\s*return\s+array\s*\((.+)\);\s*}#isU', $file, $info)){
			preg_match_all('#[\'"](.+)[\'"]\s*=>\s*[\'"](.+)[\'"]#', $info[1], $data);
			$out = "<plugin>\n";
			foreach ($data[1] as $i=>$d) {
				$out .= "\t<$d>{$data[2][$i]}</$d>\n";
			}
			$out .= "</plugin>\n\n";
			echo htmlspecialchars($out);
			$file = preg_replace('#^((.+)\.plugin\.)(php)$#i', '$1xml', $name);
			echo $file;
			//file_put_contents($file, $out);
			//shell_exec('cd ' . dirname($file) . '; svn add ' . basename($file) . '; svn -q ci -m"creating xml info files"&');
		}
	}
}
 
?>
</pre>

Toggle wordwrap

Referring DomainHits
Unknown Referer 127
pastoid.com 10
search.live.com 3
Is this paste spam?
<Hide