User:Funky King/Useful Stuff/History Copier

History-Copier
If you are bored of copying the history manually (because of the Builds wipe), this is the right script for you! I'm sorry because I can't host it, but my webspce doesn't allow remote file access... That's why I provide it here, so you can use it, too.

If You find any bugs, please post that here.

&lt;html&gt; &lt;head&gt; &lt;title&gt;GuildWiki History-Copier&lt;/title&gt; &lt;/head&gt; &lt;body&gt; &lt;form action=&quot;gwiki.php&quot; method=&quot;post&quot;&gt; GuildWiki Article: &lt;input type=&quot;text&quot; name=&quot;article&quot; /&gt;&lt;input type=&quot;submit&quot; value=&quot;Generate History-Code&quot; /&gt; &lt;/form&gt; &lt;br /&gt;&lt;br /&gt; &lt;i&gt;&lt;b&gt; Warning: This process can need up to 60 seconds. When it isn't able do to it in this time it will abort with an error! Also note that only the first 500 authors (including doubles) will be shown (but the doubles will only be shown once)!&lt;/b&gt;&lt;/i&gt; &lt;?php if($_POST['article']) {

$text = file('http://gw.gamewikis.org/wiki?title='.$_POST['article'].'&amp;limit=500&amp;action=history'); $text = implode ('', $text); $text = explode('&lt;ul id=&quot;pagehistory&quot;&gt;',$text); $text = explode('&lt;/ul&gt;',$text[1]); $text = explode('&lt;span class=\'history-user\'&gt;&lt;a href=&quot;/wiki/',$text[0]); unset($text[0]); foreach($text as $key =&gt; $seg) { $seg2 = explode('&gt;',$seg); $seg2 = explode('&quot;',$seg2[0]); $res[$key.'link'] = $seg2[0]; if(substr($seg2[0],0,5)==&quot;User:&quot;) $res[$key.'name'] = substr($seg2[0],5); if(substr($seg2[0],0,8)==&quot;Special:&quot;) $res[$key.'name'] = substr($seg2[0],22); } $res = array_unique($res); $text = &quot;== Credits == Original author: Special:Contributions/&quot;.$res['1name'].&quot; &lt;br&gt; Additional contributions by:&quot;; for($i=2;$i&lt;=(count($res)-2)/2;$i++) { if($res[$i.'link']) $text.=&quot;&quot;.$res[$i.'name'].&quot;, &quot;; } $text = substr($text,0,-2); echo '&lt;br /&gt;&lt;br /&gt;&lt;textarea rows=&quot;10&quot; cols=&quot;50&quot;&gt;'.$text.'&lt;/textarea&gt;';

} ?&gt; &lt;/body&gt; &lt;/html&gt;