All pastes #555001 Raw Edit

Someone

public text v1 · immutable
·published 2007-06-10 10:10 UTC
rendered paste body
<html>
  <body>

<?
$defnamefile = "Defname.txt";
$nick = $_GET['nick'];
$host = $_GET['host'];
$temp = file("$defnamefile");
$readfile = fopen($defnamefile,'w');
foreach ($temp as $tmp) {
if (stristr($tmp,"$host")) {
$str = $tmp;
}
$tmmp .= "\n$tmp";
}
$tmp = str_replace($str,"$host $nick",$tmmp);
fwrite($readfile,"$tmp");
fclose($readfile);

?>

  </body>
</html>