Jump to content

User talk:R3m0t/Reports2

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

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","</nowiki>'''$0'''",htmlentities($match[0])); print "*: <nowiki>$m"; nl();  $o2 .= "$m {$row['cur_title']}\r\n"; }
}
nl();
print $o2;
?>
<?php
set_time_limit(0);
header('Content-type: text/plain');
$w = $_GET['f'];
$cont = file("{$w}2.txt");
while ($v != "\r\n") {
 $v = array_shift($cont);
}
foreach ($cont as $match) {
 preg_match("/([^ ]+)\r\n$/",$match,$name);
 $name = $name[1];
 if (stripos(file_get_contents("http://en.wikipedia.org/wiki/Special:Export/$name"),"$w $w") !== FALSE) {
  print $name . "\r\n";
 } else { print "!" . $name . "\r\n"; }
}
?>

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)

Start a discussion about improving the User:R3m0t/Reports2 page

Start a discussion