Last edited by coolgirlpwns; 21-08-12 at 04:19 PM.
If it is working for him and not for you you should check your serversettings. I guess fsock is not allowed @ your webserver.
BTW: "Does not work" is not an Errorreport ! We cannot help you if you dont tell us what exactly is happening. Trying that script at our webserver is useless.![]()
What is fsock?
Okay exactly what is happening:
Our server is a 1 account per ip(with exceptions), so the registration script has a timed ip blocker on it(i know its abusable). But the problem is, some players who have never joined our server before automatically get the error that they cannot register, even though they never have registered before. The same thing happens with our vote(like at least half the server cant vote). Some players told me that it blocks entire isp's once 1 person has done it, i dont understand though -.-'
A lot of ISPs use Dynamic IP addresses and change them a lot, in the US where I am I know they don't do it as often but I know people from other countries they like to change them a lot for whatever reason
That is why it causes that error to come up
I really don't see why you should limit them to one account though... imo it isn't that big of an issue
Last edited by das7002; 18-11-10 at 06:12 AM.
so how do perfect world servers set up timed votes and they work? im still confused, is there no fix to this D=
Like said Das, IP banning is pretty useless with dynamic IPs....
And why you only want one account per IP? Prevent bot and cheat? You'll never stop them. If they want to fck up your server, they will always be smart to do this and always find a way. So, give up.
Otherwise for your vote script, do the way that Zorno said.
1. Let the person to vote with his account.
2. Put infos in a table that the account has voted.
If he try to re-vote again, the PHP script will search in the mysql table if there already a record for this account.
And reset the table like every 12h or 24h with a crontab. crontab is the easier way but only work with Linux.
There's some strings and functions in PHP that may do the same job but dunno how.
Last edited by Romulan; 18-11-10 at 11:22 AM.
tada!PHP Code:<?php
mysql_connect("host", "user", "pass");
mysql_select_db("database with vote users");
mysql_query("TRUNCATE TABLE `table with vote users`;");
mysql_close();
Honestly though your best bet would to be just stick a timestamp somewhere on the db entry and then compare the two so it is actually a 12 hr difference between each vote no matter when they actually did it
Last edited by das7002; 18-11-10 at 10:07 PM.
um im really confused what you guys are telling me xD, im not good with php at all =( Ill have to show my web designer this thread and see if she can do it ^.^ Thanks guys
Show this list your "webdesigner":
preconfig -> Usernametable ( i whould use vote as name )
Let person who vote type his/her accountname in a textbox and check if it exist in the DB ( account table )
If accountname exist then check if it is in vote table ( already voted )
If already voted show an error Page ( "You alredy voted today" or something )
If not voted yet, write the accountname into the vote table and redirect the browser to the voting page.
Make a script that deleted all entrys of the vote table.
Make a crontab ( i use cronjob.de for that) that starts that script every 24 hours.
Thats the easiest way i think![]()
You could do that but just putting a time stamp on when they actually voted would be the best
That way you can just have the script check to see when they last voted and give the users a countdown until they can vote again, that way it is independent of the actual system itself and depends entirely on the user