StrangeCoder
11-25-2010, 12:16 AM
1. Insert this anywhere you want to add your minichat:
<button onmouseover="this.style.cursor='pointer'"; onClick="send()"><img src="images/send.gif" width="133"></button><br>
<input style="background: black; color: white; text-align: center" onFocus="value=''" type="text" name="search" id="chat" value="">
<br>
<div id="frame1">
<iframe width="153" src="jkgh1g5h1j5gh12k5g21hk5gh5gf12tjf12cj125jyc2y5l6glug36gl36lg6gyk5f12yk1fgk515k125gyk251h125vh125kjhv 51k.php">
</iframe>
<script>
function send()
{
var message = document.getElementById('chat').value;
var meslen = document.getElementById('chat').value.length;
if (meslen <= 0)
{
alert('Please,write the message.');
}
else if (meslen >= 81)
{
alert('Maximum characters in your messages must be 80');
}
else
{
document.getElementById("frame1").innerHTML='<iframe width="153" src="fafbj1bhvhj1vg12vi4g12iv4g1h2ivgh1i4vgy12iv5gh5r1jv5ghjvgfvjfg1h2vfg12vfg21ufv21gvc12g4vc12g4vc12grh uvg1rv21gvc12grvg1ruvg21r21g.php?message='+message+'"></iframe>';
}
}
</script>
-> script fixes max and min characters and other crap.
2. Create long php file with loooong name "jkgh1g5h1j5gh12k5g21hk5gh5gf12tjf12cj125jyc2y5l6glug36gl36lg6gyk5f12yk1fgk515k125gyk251h125vh125kjhv 51k.php" (increases security, kinda...) at the same directory. HTML and CSS attributes you configure yourself.
<html>
<head>
<script type="text/javascript">
function pageScroll() {
window.scrollBy(0,10000);
}
</script>
</head>
<body>
<body onload="pageScroll()">
<div id="contents">
<?
$fps = file("/var/tmp/messages.txt");
$test = array_slice($fps, 0);
echo "<table border='1' style='color: white' bordercolor='#B1749F' background='black'>";
while (list ($line_num, $line) = each ($test))
{
$line_num = $line_num + 1;
echo "<tr>";
echo "<td><h3>#" .$line_num. " " .$line;
echo "</td></tr>";
}
echo "</table>";
?>
<br><br>
</div>
</body>
</html>
-> NOTICE the line:
$fps = file("/var/tmp/messages.txt");"
You should be sure that you have permissions to write file at this directory (by default: /var/tmp/messages.txt). If you haven't, then change directory. Messages.txt that will contain spam from minichat ;-)
3. Create another php file with another loooong name "fafbj1bhvhj1vg12vi4g12iv4g1h2ivgh1i4vgy12iv5gh5r1jv5ghjvgfvjfg1h2vfg12vfg21ufv21gvc12g4vc12g4vc12grh uvg1rv21gvc12grvg1ruvg21r21g.php" at the same directory.
<?php
$message = htmlspecialchars($_GET['message']);
if ($message)
{
$fp = fopen('/var/tmp/messages.txt', 'a');
$date = date("g:i A");
fwrite($fp, "at " .$date. "</h3>" .$message. "\n");
fclose($fp);
header("Location: jkgh1g5h1j5gh12k5g21hk5gh5gf12tjf12cj125jyc2y5l6glug36gl36lg6gyk5f12yk1fgk515k125gyk251h125vh125kjhv 51k.php");
}
else
{
header("Location: jkgh1g5h1j5gh12k5g21hk5gh5gf12tjf12cj125jyc2y5l6glug36gl36lg6gyk5f12yk1fgk515k125gyk251h125vh125kjhv 51k.php");
}
?>
-> NOTICE the line:
$fp = fopen('/var/tmp/messages.txt', 'a');
You should be sure that you have permissions to write file at this directory (by default: /var/tmp/messages.txt). If you haven't, then change directory. Messages.txt that will contain spam from minichat ;-)
That's all. You can just delete messages.txt if you got too much of flooders ;-)
<button onmouseover="this.style.cursor='pointer'"; onClick="send()"><img src="images/send.gif" width="133"></button><br>
<input style="background: black; color: white; text-align: center" onFocus="value=''" type="text" name="search" id="chat" value="">
<br>
<div id="frame1">
<iframe width="153" src="jkgh1g5h1j5gh12k5g21hk5gh5gf12tjf12cj125jyc2y5l6glug36gl36lg6gyk5f12yk1fgk515k125gyk251h125vh125kjhv 51k.php">
</iframe>
<script>
function send()
{
var message = document.getElementById('chat').value;
var meslen = document.getElementById('chat').value.length;
if (meslen <= 0)
{
alert('Please,write the message.');
}
else if (meslen >= 81)
{
alert('Maximum characters in your messages must be 80');
}
else
{
document.getElementById("frame1").innerHTML='<iframe width="153" src="fafbj1bhvhj1vg12vi4g12iv4g1h2ivgh1i4vgy12iv5gh5r1jv5ghjvgfvjfg1h2vfg12vfg21ufv21gvc12g4vc12g4vc12grh uvg1rv21gvc12grvg1ruvg21r21g.php?message='+message+'"></iframe>';
}
}
</script>
-> script fixes max and min characters and other crap.
2. Create long php file with loooong name "jkgh1g5h1j5gh12k5g21hk5gh5gf12tjf12cj125jyc2y5l6glug36gl36lg6gyk5f12yk1fgk515k125gyk251h125vh125kjhv 51k.php" (increases security, kinda...) at the same directory. HTML and CSS attributes you configure yourself.
<html>
<head>
<script type="text/javascript">
function pageScroll() {
window.scrollBy(0,10000);
}
</script>
</head>
<body>
<body onload="pageScroll()">
<div id="contents">
<?
$fps = file("/var/tmp/messages.txt");
$test = array_slice($fps, 0);
echo "<table border='1' style='color: white' bordercolor='#B1749F' background='black'>";
while (list ($line_num, $line) = each ($test))
{
$line_num = $line_num + 1;
echo "<tr>";
echo "<td><h3>#" .$line_num. " " .$line;
echo "</td></tr>";
}
echo "</table>";
?>
<br><br>
</div>
</body>
</html>
-> NOTICE the line:
$fps = file("/var/tmp/messages.txt");"
You should be sure that you have permissions to write file at this directory (by default: /var/tmp/messages.txt). If you haven't, then change directory. Messages.txt that will contain spam from minichat ;-)
3. Create another php file with another loooong name "fafbj1bhvhj1vg12vi4g12iv4g1h2ivgh1i4vgy12iv5gh5r1jv5ghjvgfvjfg1h2vfg12vfg21ufv21gvc12g4vc12g4vc12grh uvg1rv21gvc12grvg1ruvg21r21g.php" at the same directory.
<?php
$message = htmlspecialchars($_GET['message']);
if ($message)
{
$fp = fopen('/var/tmp/messages.txt', 'a');
$date = date("g:i A");
fwrite($fp, "at " .$date. "</h3>" .$message. "\n");
fclose($fp);
header("Location: jkgh1g5h1j5gh12k5g21hk5gh5gf12tjf12cj125jyc2y5l6glug36gl36lg6gyk5f12yk1fgk515k125gyk251h125vh125kjhv 51k.php");
}
else
{
header("Location: jkgh1g5h1j5gh12k5g21hk5gh5gf12tjf12cj125jyc2y5l6glug36gl36lg6gyk5f12yk1fgk515k125gyk251h125vh125kjhv 51k.php");
}
?>
-> NOTICE the line:
$fp = fopen('/var/tmp/messages.txt', 'a');
You should be sure that you have permissions to write file at this directory (by default: /var/tmp/messages.txt). If you haven't, then change directory. Messages.txt that will contain spam from minichat ;-)
That's all. You can just delete messages.txt if you got too much of flooders ;-)