User talk:R3m0t/Reports2

What do you mean by your comment regarding an offer of Gmail addresses on my talk page? Also, is there any way for me to receive the source code used to generate your reports without using e-mail? Bart133 (t) 01:14, 11 Feb 2005 (UTC)


 * I mean that because you helped, I'm being nice and offering you up to 3 gmail addresses. I would need to send you the invite codes by email. Also, yes, I can post them here if you want. r3m0t 07:13, 11 Feb 2005 (UTC)

This is released under GPL.

<?php header('Content-type: text/plain'); set_time_limit(0); if (empty($_GET['c'])) { die('Use ?c=and'); } function nl { print "\r\n"; } mysql_connect('localhost','wikiuser','') or die('no conn'); mysql_select_db('wikipedia-en'); $str = $_GET['c']; $lim = 'LIMIT 1'; $q = mysql_query("SELECT cur_id, cur_namespace, cur_title, cur_text FROM cur WHERE cur_text LIKE '% $str $str %' ORDER BY cur_title $lim"); while ($row = mysql_fetch_assoc($q)) { print "* {$row['cur_title']}"; nl; preg_match_all("/.{1,20} $str $str .{1,20}/i",$row['cur_text'],$matches,PREG_SET_ORDER); foreach ($matches as $match) { $m = preg_replace("/$str $str/i"," $0 ",htmlentities($match[0])); print "*: $m "; nl; $o2 .= "$m {$row['cur_title']}\r\n"; } } nl; print $o2; ?>



This needs to be modified. Queries should be at 1 every 10 seconds, these could be combined, it needs to save output of the first script to a file, it could take words to search for from a list, etc. r3m0t 21:30, 11 Feb 2005 (UTC)