What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » PHP Shoutbox help

Pages: (4): « First « 1 2 [ 3 ] 4 » Last »
PHP Shoutbox help
Author: Message:
Ezra
Veteran Member
*****

Avatar
Forgiveness is between them and God

Posts: 1960
Reputation: 31
37 / Male / Flag
Joined: Mar 2003
RE: PHP Shoutbox help
quote:
Originally posted by M73A
$find javascript $ Delete

The function I showed you removes (or at least tries to) remove all HTML + PHP from the input string. That includes javascript and should leave clean text.
[Image: 1-0.png]
             
06-08-2007 09:52 PM
Profile PM Web Find Quote Report
M73A
Veteran Member
*****

Avatar


Posts: 3213
Reputation: 37
34 / Male / Flag
Joined: Jul 2004
O.P. RE: PHP Shoutbox help
quote:
Originally posted by Ezra
quote:
Originally posted by M73A
$find javascript $ Delete

The function I showed you removes (or at least tries to) remove all HTML + PHP from the input string. That includes javascript and should leave clean text.

oh crap sorry, i thought that was an example of something malicious:P sorreh ^_^


hm i tried putting it in but it didnt work. where would you advise to put it?

This post was edited on 06-08-2007 at 10:10 PM by M73A.

[Image: lost7ru.gif]
06-08-2007 10:07 PM
Profile E-Mail PM Find Quote Report
Ezra
Veteran Member
*****

Avatar
Forgiveness is between them and God

Posts: 1960
Reputation: 31
37 / Male / Flag
Joined: Mar 2003
RE: PHP Shoutbox help
quote:
Originally posted by M73A
hm i tried putting it in but it didnt work. where would you advise to put it?

code:
$fp = fopen("shouts.txt","a");
   fseek($fp, 0);
   fwrite($fp,strip_tags($_POST['user']).":".strip_tags($_POST['shout'])."\n");
   fclose($fp);
   $shoutbox_page = "http://pps3.awardspace.com/Shoutbox/index.php";
   header("Location: $shoutbox_page");

Bold parts are the changed parts.

I also added my other suggestion about your add to top of the file problem, the fseek will put the pointer at the start of the file.

EDIT: However, I'm not sure how fwrite writes the string to it, if it will overwrite what is already there or it will add it before the rest, I actually think it's the first, so it might not be that helpful :P, but the strip_tags are unaffected, so you can still copy that part :D

EDIT2: Indeed I was right, there is no prepend mode, so with fseek the contents will be overwritten, nevermind that then, just use the other suggestions about the prepending.

This post was edited on 06-08-2007 at 10:33 PM by Ezra.
[Image: 1-0.png]
             
06-08-2007 10:23 PM
Profile PM Web Find Quote Report
M73A
Veteran Member
*****

Avatar


Posts: 3213
Reputation: 37
34 / Male / Flag
Joined: Jul 2004
O.P. RE: PHP Shoutbox help
YAYYYY

Thanks :D:D:D

come here asking about locations, and get extra help about security!!

Thanks buddy!

[Image: lost7ru.gif]
06-08-2007 10:32 PM
Profile E-Mail PM Find Quote Report
Nathan
Veteran Member
*****

Avatar
Yeah, "large dimensions" ;)

Posts: 2984
Reputation: 76
– / Male / Flag
Joined: Apr 2005
RE: PHP Shoutbox help
Where is it btw, i'd like to see it :P
Touch Innovation - touch friendly programs/applications for the windows mobile!


06-09-2007 10:08 AM
Profile E-Mail PM Web Find Quote Report
Felu
Veteran Member
*****


Posts: 2223
Reputation: 72
30 / Male / Flag
Joined: Apr 2006
Status: Away
RE: PHP Shoutbox help
If a username has ':' or a shout contains ':', this might not work properly :P.

This post was edited on 06-09-2007 at 10:27 AM by Felu.
06-09-2007 10:27 AM
Profile E-Mail PM Web Find Quote Report
M73A
Veteran Member
*****

Avatar


Posts: 3213
Reputation: 37
34 / Male / Flag
Joined: Jul 2004
O.P. RE: PHP Shoutbox help
quote:
Originally posted by Napbree
Where is it btw, i'd like to see it :P
http://pps3.awardspace.com/ its there, mentality got me to help him make some ps3 clan thing, personally i think he should buy me a ps3:P

[Image: lost7ru.gif]
06-09-2007 06:13 PM
Profile E-Mail PM Find Quote Report
Nathan
Veteran Member
*****

Avatar
Yeah, "large dimensions" ;)

Posts: 2984
Reputation: 76
– / Male / Flag
Joined: Apr 2005
RE: PHP Shoutbox help
Jesus, thats very unsecure, and spam not proof
Touch Innovation - touch friendly programs/applications for the windows mobile!


06-09-2007 07:03 PM
Profile E-Mail PM Web Find Quote Report
M73A
Veteran Member
*****

Avatar


Posts: 3213
Reputation: 37
34 / Male / Flag
Joined: Jul 2004
O.P. RE: PHP Shoutbox help
quote:
Originally posted by Napbree
Jesus, thats very unsecure, and spam not proof
lol yep ^_^

[Image: lost7ru.gif]
06-09-2007 09:42 PM
Profile E-Mail PM Find Quote Report
Nathan
Veteran Member
*****

Avatar
Yeah, "large dimensions" ;)

Posts: 2984
Reputation: 76
– / Male / Flag
Joined: Apr 2005
RE: PHP Shoutbox help
add this:
code:
if(empty($_POST['shout'])) {
echo "Sorry its empty";
}

Touch Innovation - touch friendly programs/applications for the windows mobile!


06-09-2007 10:11 PM
Profile E-Mail PM Web Find Quote Report
Pages: (4): « First « 1 2 [ 3 ] 4 » Last »
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On