Mysql stuff with this site

SpaceshipSpaceship
Watch

TUFKATH

Account Closed
Impact
13
on http://shas.taylorhewitt.com

ive spent the past 15 minutes constantly deleting spam of this site by a ****ing loser. he is pissing me off so much! it wont end!

its set to automaticly submit to the mysql database, then withdraw it and post it there. what can i do so i have to verify it first?

thanks
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
AfternicAfternic
Have them register first, or do a simple image verification.

Ah, these aren't bots. Okay, make sure they can only post maybe... once per day.

An easy way, yet easily breakable way to do this is to set a cookie that expires in 24 hours. Then, if the cookie exists as they try to post, do not allow it to be submitted.
 
Last edited:
0
•••
yeah, cookies are a good idea. if u make them register, you can log their IP and set sessions and cookies and then have a lot of fun with them hehe.

but seriously, u can set a cookie so that it only allows a certain amount of submissions. sorta like flood control on forums.
 
0
•••
The thing is it's supposed to be completely anonymous...
 
0
•••
You want to moderate the comments before they go public on your site? I don't know what script you're using, but it should be a simple job for a php coder to modify it to require moderation.

In short, add a column to your MySQL table named status and have it default to 0 when new entries are submitted. Then have your site only publically display rows where status=1. Then setup an admin page to view unapproved comments and approve them.
 
0
•••
Yeah I don't know how to do that... :(
 
0
•••
Taylor Hewitt said:
Yeah I don't know how to do that... :(

Did you write the script you have now?

I guess you can hire someone to code it for you, or if you want to make it a public project you we can help you code it here in the forum.
 
0
•••
Most other forums are made to be helpful free of cost but I don't really have money to spend on this sort of thing...
 
0
•••
Here...

When they post a topic, use this:

setcookie("cookiename", "date_here_methinks", 60*60*24);

That sets a cookie that expires in 1 day.

Then, when they post.

if (isset($_COOKIE['cookiename']))
{
echo("ERROR > You can only post once per day.");
exit;
}

That should work :)
 
0
•••
What do I put for the date thingy?
 
0
•••
bump
 
0
•••
Oh, the *date_here_methinks* thing?

PHP:
$date = "F d Y";

That's off the top of my head, but that produces a human-formatted date. Replace "date_here_methinks" with:

$date

And that just puts the $date into the cookie as its content.
 
0
•••
Thanks.

But where do I put this stuff?

setcookie("cookiename", "date_here_methinks", 60*60*24);

if (isset($_COOKIE['cookiename']))
{
echo("ERROR > You can only post once per day.");
exit;
}
 
0
•••
bump
 
0
•••
At the beginning of the file where the post is made. Before any other headers are sent.
 
0
•••
Warning: Cannot modify header information - headers already sent by (output started at /home/www/taylorhewitt.com/shas/index.php:8) in /home/www/taylorhewitt.com/shas/index.php on line 24

That is what I got.
 
0
•••
Yeah. Um, post your code IN [ PHP ] TAGS. This means you've already sent headers, or some sort of output, to the browser.
 
0
•••
you have to place the code in the upmost top of the page.

if the top page is:

<?php
// allot fo code

do it like this:
<?php
// the cookie code
// allot fo code
 
0
•••
Really I did that! Same error though... :(

Is this going to make the cookie set right after the submit button is pressed? That's my aim.
 
0
•••
As I requested before, can you PLEASE COPY AND PASTE THE CODE HERE IN PHP TAGS?

Thanks! :)
 
0
•••
Dynadot — .com TransferDynadot — .com Transfer
Appraise.net

We're social

Escrow.com
Spaceship
Rexus Domain
CryptoExchange.com
Domain Recover
CatchDoms
DomainEasy — Live Options
DomDB
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back