Results 11 to 18 of 18
-
10th Oct 2011, 03:05 PM #11Member
Your buttons doesnt work, are you trying to make them work? What functions they have? I didnt work with DDL scripts before.
-
10th Oct 2011, 03:07 PM #12Respected MemberWebsite's:
DL4Everything.com Soft2050.in
-
10th Oct 2011, 03:18 PM #13OPBannedWebsite's:
WarezRelease.org ThatHosting.coty m8, it works.
obvios fix lol, any suggestions to recoord IP?
-
10th Oct 2011, 03:24 PM #14Respected MemberWebsite's:
DL4Everything.com Soft2050.in
-
10th Oct 2011, 07:11 PM #15Member
Yes as I said.. "I've changed a few things to clean the script up to make it work better. But it wont solve the problem..."
:-)
He uses isset() on other parts of the script but not the parts where it's actually needed to be a 100% error free snippet of script.
Also that $id = isset($_GET['id']) ? mysql_real_escape_string(trim($_GET['id'])): '';
it rather pointless... only a (int) is required as mysql_real_escape_string() makes an unnecassary database query.
Made by Envee :P
-
10th Oct 2011, 07:15 PM #16Member
Actually, using the IP is no longer a thing which webmasters should use in my own personal opinion. Many people have dynamic IP addresses - some even have a new IP every page load.
I'd use a md5 hash to be sent which blocks multiple inserts and also if they manage to unset the session of there end... the md5 can confirm it's the same or similar browser - in the md5 I'd have user agent and other header information (more header information the better, makes them more unique + a day / month via date()).
^ and that would mean you'd be XSS protected.
Made by Envee :P
-
12th Oct 2011, 10:44 PM #17OPBannedWebsite's:
WarezRelease.org ThatHosting.cook so now im adding an IP check, here's what ive come up with:
PHP Code:$IP = gethostbyname($_SERVER['REMOTE_ADDR']);
$id = (isset($_GET['id'])) ? mysql_real_escape_string(trim($_GET['id'])): '';
$check = "SELECT ip FROM wcddl_downloads WHERE id = '$id'";
$result = mysql_query($check) or die(mysql_error());
if ($IP == $result) {
$thumbsHTML .= 'You have already voted';
} else {
$thumbsHTML .= '
<center>
<form action="" method="post">
<input name="good" type="submit" value="." id="upBtn" /><br />
<input name="bad" type="submit" value="." id="downBtn" />
</form>
</center>';
}
-
13th Oct 2011, 04:53 PM #18Respected MemberWebsite's:
DL4Everything.com Soft2050.inI see no point why you should use gethostbyname after getting user ip
And you are checking the ip with the mysql query results
$IP == $result
Use mysql_num_rows to count results!Try this:
PHP Code:$IP = $_SERVER['REMOTE_ADDR'];
$id = (isset($_GET['id'])) ? mysql_real_escape_string(trim($_GET['id'])): '';
$check = "SELECT ip FROM wcddl_downloads WHERE id = '$id'";
$result = mysql_query($check) or die(mysql_error());
if (mysql_num_rows($result)==0) {
$thumbsHTML .= '
<center>
<form action="" method="post">
<input name="good" type="submit" value="." id="upBtn" /><br />
<input name="bad" type="submit" value="." id="downBtn" />
</form>
</center>';
} else {
$thumbsHTML .= 'You have already voted';
}
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Thumbs Ups and Thumbs Downs of 2011
By Krack3r in forum General DiscussionReplies: 8Last Post: 29th Dec 2011, 11:51 PM -
Thumbs up!
By Maniac_ in forum Feedback and SuggestionsReplies: 5Last Post: 20th Aug 2011, 01:43 AM -
Tunisian Needs Thumbs Up
By Jumbo in forum General DiscussionReplies: 9Last Post: 18th Jan 2011, 12:38 PM -
New Logo. Thumbs up or Down?
By fileserve-links in forum Graphics AreaReplies: 12Last Post: 29th Sep 2010, 08:45 PM -
Im after a mod like ? dgTopic Thumbs Hellp Plz :)
By bumilad20 in forum phpBBReplies: 0Last Post: 21st Dec 2009, 03:38 AM
themaCreator - create posts from...
Version 3.50 released. Open older version (or...