|  PHP Shoutbox help | 
| Author: | 
Message: | 
Veggie 
Full Member 
   
  
  
 
Posts: 415 Reputation: 21 
38 /   /   
Joined: Sep 2004 
 | 
 RE: RE: PHP Shoutbox help
code: <?php 
 
  /* ------------------------------------------------------- 
 
                           ShoutBox v1.1 
                     By: Mark Lethbridge, 2007 
 
     ------------------------------------------------------- 
 
     Install notes: 
     Only thing that needs to be changed in this file is the 
     line: $shoutbox_page = "index.php"; 
     You simple change "index.php" into the correct page 
     that the shoutbox will appear in. 
 
     -------------------------------------------------------- */ 
 
$file='shouts.txt'; 
$new = $_POST['user'].":".$_POST['shout'] . "\n" . file_get_contents($file); 
$fp =fopen($file,'w'); 
fwrite($fp, $new); 
fclose($fp); 
   $shoutbox_page = "http://pps3.awardspace.com/Shoutbox/index.php"; 
   header("Location: $shoutbox_page"); 
 
?> 
  
I have no idea if that will work btw  
 This post was edited on 06-08-2007 at 07:16 PM by Veggie.
 |   
 | 
| 06-08-2007 07:16 PM | 
 | 
  | 
Veggie 
Full Member 
   
  
  
 
Posts: 415 Reputation: 21 
38 /   /   
Joined: Sep 2004 
 | 
| 
 RE: PHP Shoutbox help
 this also isnt very secure, the input really should be striped of bad things, but i dont have time to do that for you. 
 |   
 | 
| 06-08-2007 07:18 PM | 
 | 
  | 
M73A 
Veteran Member 
     
  
  
  
Posts: 3212 Reputation: 37 
35 /   /   
Joined: Jul 2004 
 | 
O.P.  RE: PHP Shoutbox help
you rock veggie!! works perfect   !    
 |   
 | 
| 06-08-2007 07:19 PM | 
 | 
  | 
Ezra 
Veteran Member 
     
  
  
Forgiveness is between them and God
  
Posts: 1960 Reputation: 31 
38 /   /   
Joined: Mar 2003 
 | 
 RE: PHP Shoutbox help
You could also just use: 
code: fseek ($handle, 0);
  To place the pointer at the beginning of the file    
 |   
 | 
| 06-08-2007 07:24 PM | 
 | 
  | 
M73A 
Veteran Member 
     
  
  
  
Posts: 3212 Reputation: 37 
35 /   /   
Joined: Jul 2004 
 | 
O.P.  RE: PHP Shoutbox help
quote: Originally posted by Veggie 
this also isnt very secure, the input really should be striped of bad things, but i dont have time to do that for you.
  lol bad things?   
tell me what you meant and ill look into that one   
 |   
 | 
| 06-08-2007 07:25 PM | 
 | 
  | 
vikke 
Senior Member 
    
  
  
 
Posts: 900 Reputation: 28 
32 /   /   
Joined: May 2006 
 | 
 RE: RE: PHP Shoutbox help
quote: Originally posted by M73A 
quote: Originally posted by Veggie 
this also isnt very secure, the input really should be striped of bad things, but i dont have time to do that for you.
  lol bad things?   
 
tell me what you meant and ill look into that one  
  Evil javascript code for example.  
 |   
 | 
| 06-08-2007 07:43 PM | 
 | 
  | 
Nathan 
Veteran Member 
     
  
  
Yeah, "large dimensions" ;)
  
Posts: 2978 Reputation: 76 
– /   /   
Joined: Apr 2005 
 | 
| 
 RE: PHP Shoutbox help
 You could delete files and directorys with that. 
 |   
 | 
| 06-08-2007 07:44 PM | 
 | 
  | 
Ezra 
Veteran Member 
     
  
  
Forgiveness is between them and God
  
Posts: 1960 Reputation: 31 
38 /   /   
Joined: Mar 2003 
 | 
 RE: PHP Shoutbox help
quote: Originally posted by vikke 
Evil javascript code for example.
  
A simple  code: $stripped = strip_tags ($str);
  
should be enough, no SQL used so no SQL Injection    
 |   
 | 
| 06-08-2007 07:44 PM | 
 | 
  | 
M73A 
Veteran Member 
     
  
  
  
Posts: 3212 Reputation: 37 
35 /   /   
Joined: Jul 2004 
 | 
O.P.  RE: PHP Shoutbox help
 
er, is it hard to put in like $find javascript $ Delete  
 |   
 | 
| 06-08-2007 09:30 PM | 
 | 
  | 
ShawnZ 
Veteran Member 
     
  
  
 
Posts: 3141 Reputation: 43 
33 /   /   
Joined: Jan 2003 
 | 
 RE: PHP Shoutbox help
quote: Originally posted by M73A 
  
 
er, is it hard to put in like $find javascript $ Delete
  
wtf o.o  
Spoiler:   the game. 
the game. 
the game. 
the game. 
the game. 
the game. 
the game. 
the game. 
the game. 
the game. 
the game. 
the game. 
the game. 
the game. 
the game. 
the game. 
the game. 
the game. 
the game. 
the game. 
the game. 
the game. 
the game. 
the game. 
the game. 
the game. 
the game. 
the game. 
the game. 
the game. 
the game. 
the game. 
  
 |   
 | 
| 06-08-2007 09:49 PM | 
 | 
  | 
| 
Pages: (4): 
« First
 
«
 
 1
 [ 2 ]
 3
 4
 
»
 
Last »
 | 
| 
 |