Shoutbox 1.1. PHP Script - php Form

Author Topic: Shoutbox 1.1. PHP Script  (Read 39692 times)

Offline alex

  • Global Moderator
  • *****
  • Posts: 76
  • Karma: +20/-0
    • View Profile
Shoutbox 1.1. PHP Script
« on: June 09, 2008, 01:35:30 AM »
1. Unzip
2. Upload shoutbox folder


Code: [Select]
http://yoursite.com/shoutbox/
3. Upload file shout.php

Code: [Select]
http://yoursite.com/shout.php
4. chmod 666 sett.php

5. Follow the instructions

Code: [Select]
http://yoursite.com/shoutbox/menage/install.php
6. chmod 644 config.php

7. PHP Code to display shoutbox:



Code: [Select]

<IFRAME SRC="shoutbox/code.php" WIDTH=200 HEIGHT=300 BORDER=1 SOLID></iframe>

Download:
« Last Edit: June 09, 2008, 01:45:25 AM by alex »

Offline osviweb

  • Supporter
  • **
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: Shoutbox 1.1. PHP Script
« Reply #1 on: August 05, 2008, 08:59:31 AM »
unfortunately it does not work form me.
Cannot find in original and code after install che config.php file.
error message always invalid character in any type in shout box.
would be nice alsa have the possibility to install  in subdirectory

thanks

Osvaldo

Offline q8ieng

  • Supporter
  • **
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: Shoutbox 1.1. PHP Script
« Reply #2 on: August 15, 2008, 06:07:29 AM »
Awesome thanks a lot admin :D

wixy

  • Guest
Re: Shoutbox 1.1. PHP Script
« Reply #3 on: May 31, 2009, 08:14:24 AM »
thx. ;D ;D ;D

Offline cosmofur

  • Supporter
  • **
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: Shoutbox 1.1. PHP Script
« Reply #4 on: July 04, 2009, 02:53:16 PM »
Can not test due to the use of the non opensource archive package 'rar' please do not use rar. It has no features not found in other free archive tools and in a sign of an amateur effort.

Offline Binmark

  • Supporter
  • **
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Shoutbox 1.1. PHP Script
« Reply #5 on: August 26, 2009, 05:55:55 AM »
Hello

I always get the followinh error when inserting text in the shoutbox: Invalid Characters:

Offline admin

  • Administrator
  • *****
  • Posts: 67
  • Karma: +11/-0
  • Gender: Male
    • View Profile
Re: Shoutbox 1.1. PHP Script
« Reply #6 on: August 26, 2009, 09:31:55 AM »
In shout.php delete the following.......
Code: [Select]
if(isset($_POST[submit])){
 
  if(trim($_POST[text1])=='' || strlen(trim($_POST[text1])) < 6 ||strlen(trim($_POST[text1])) >120){
echo 'Max 120';

 echo "<center>Max Characters Message Field: 120 Min: 6<br><a href=\"javascript:history.go(-1)\">Go Back</a><br></center>"; 
die;
  }
if(trim($_POST[text])=='' || strlen(trim($_POST[text])) < 2 ||strlen(trim($_POST[text])) >30){
echo 'Max 30';

 echo "<center>Max Characters Name Field: 30 Min: 2<br><a href=\"javascript:history.go(-1)\">Go Back</a><br></center>"; 
die;
  }

$text = $_POST['text'];
$text = $_POST['text'];
$main = $_POST['main'];

?>
<?php 
function Check($text)
{
if (
eregi("^[0-9a-z]",$text)) 
    {
        return 
true;
    }
    else
    {   
        return 
false;
    }
}
if ((empty(
$text)) || (!Check($text)))
{
 echo 
"<center>Invalid Characters:<a href=\"javascript:history.go(-1)\">Bo Back</a></center>";  
 Die();
}
if ((empty(
$text1)) || (!Check($text1)))
{
 echo 
"<center>Invalid Characters:<a href=\"javascript:history.go(-1)\">Go Back</a></center>";  
 Die();
}

?>


....and replace it with the following:
Code: [Select]
if(isset($_POST[submit])){
 

$text = $_POST['text'];
$text1 = $_POST['text1'];
$main = $_POST['main'];

?>
<?php 
$name
=array($text,$text1);
foreach (
$name as $name
{
if (
ereg("^\.",$name)) {
echo 
"<center><font size=\"1\" face=\"tahoma\" color=\"black\">Invalid Characters:<a href=\"javascript:history.go(-1)\">Go Back</a></font></center>";  
Die();
}
if (
ereg("\<"$name)) {
echo 
"<center><font size=\"1\" face=\"tahoma\" color=\"black\">Invalid Characters:<a href=\"javascript:history.go(-1)\">Go Back</a></font></center>";  
 Die();
}
if (
ereg("\["$name)) {
echo 
"<center><font size=\"1\" face=\"tahoma\" color=\"black\">Invalid Characters:<a href=\"javascript:history.go(-1)\">Go Back</a></font></center>";  
 Die();
}

}

if (
strlen($text) < 5) {
echo 
"<center><font size=\"1\" face=\"tahoma\" color=\"black\">Name must be at least 5 characters long:
<a href=\"javascript:history.go(-1)\">
Go Back</a></font></center>"
;  
Die();
}

elseif (
strlen($text) > 70) {
echo 
"<center><font size=\"1\" face=\"tahoma\" color=\"black\">Name cannot contain more than 70 characters:
<a href=\"javascript:history.go(-1)\">
Go Back</a></font></center>"
;  
Die();
}

if (
strlen($text1) < 8) {
echo 
"<center><font size=\"1\" face=\"tahoma\" color=\"black\">Comment must be at least 8 characters long:
<a href=\"javascript:history.go(-1)\">
Go Back</a></font></center>"
;  
Die();
}

elseif (
strlen($text1) > 120) {
echo 
"<center><font size=\"1\" face=\"tahoma\" color=\"black\">Comment cannot contain more than 120 characters:
<a href=\"javascript:history.go(-1)\">
Go Back</a></font></center>"
;  
Die();
}


?>

Offline Binmark

  • Supporter
  • **
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Shoutbox 1.1. PHP Script
« Reply #7 on: August 26, 2009, 12:11:24 PM »
Thanks Admin!

That helped. When I go to the Login Page and use the credentials created, nothing happens.
Would be great if that can be solved too.

Thanks again!

Cheers,
Mark

Offline admin

  • Administrator
  • *****
  • Posts: 67
  • Karma: +11/-0
  • Gender: Male
    • View Profile
Re: Shoutbox 1.1. PHP Script
« Reply #8 on: August 26, 2009, 02:18:10 PM »
In login.php delete the following (line 19 and 66).......
Code: [Select]

<form action="<?=$PHP_SELF?><?if($QUERY_STRING){ echo"?". $QUERY_STRING;}?>" method="POST">

....and replace it with the following:
Code: [Select]
<form action="login.php<?if($QUERY_STRING){ echo"?". $QUERY_STRING;}?>" method="POST">

Offline Binmark

  • Supporter
  • **
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Shoutbox 1.1. PHP Script
« Reply #9 on: August 26, 2009, 05:21:19 PM »
Hi,

Still the same - nothing happens (But I can see the credentials in the MySQL DB)

Cheers,
Mark

Offline POON

  • Supporter
  • **
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: Shoutbox 1.1. PHP Script
« Reply #10 on: June 06, 2010, 05:47:17 AM »
when i install i get a sql error on line 6 saying;
my database is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts' in BLAH BLAH BLAH on line 6


Offline alex

  • Global Moderator
  • *****
  • Posts: 76
  • Karma: +20/-0
    • View Profile
Re: Shoutbox 1.1. PHP Script
« Reply #11 on: June 06, 2010, 10:31:34 PM »
when i install i get a sql error on line 6 saying;
my database is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts' in BLAH BLAH BLAH on line 6

If you get the following error, it means that mysqld has received many connect requests from the host 'host_name' that have been interrupted in the middle: http://dev.mysql.com/doc/refman/4.1/en/blocked-host.html

Offline lifeowner

  • Supporter
  • **
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: Shoutbox 1.1. PHP Script
« Reply #12 on: June 29, 2010, 11:51:14 AM »
Can someoen help me with it.I can find way till the shout box install.When i entered full adres i show an error 404.Cab someone help me wia the skype rs-suck

Offline stsasas

  • Supporter
  • **
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: Shoutbox 1.1. PHP Script
« Reply #13 on: August 13, 2010, 08:07:53 AM »
great code, but please it is possible to delete line between Name of publisher and between text message ? thanks

Offline niko

  • VIP
  • ****
  • Posts: 15
  • Karma: +1/-1
    • View Profile
Re: Shoutbox 1.1. PHP Script
« Reply #14 on: August 14, 2010, 11:51:39 PM »
line 52
Code: [Select]
<hr style=\"color:#e7e7e7;\" width=\"100%\" align=\"left\"> :)
« Last Edit: August 15, 2010, 12:02:13 AM by admin »