Activity Stream
48,167 MEMBERS
64191 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Page 2 of 2 FirstFirst 12
Results 11 to 18 of 18
  1.     
    #11
    Member
    Your buttons doesnt work, are you trying to make them work? What functions they have? I didnt work with DDL scripts before.
    Link Building - Contact me for 20% discount
    Learn SEO - SEFlame.com

  2.   Sponsored Links

  3.     
    #12
    Respected Member
    Website's:
    DL4Everything.com Soft2050.in
    Quote Originally Posted by Chris2009 View Post
    here is my form,

    Code: 
        <form action="" method="post">
        
            <input name="good" type="button" value="Good Download xD" /> <input name="bad" type="button" value="Bad Download :)" />
        </form>
    here's a test http://warezrelease.info/download-11...UR%29-PS3.html
    Wheres the submit button?
    Add it somewhere and it will be fine

  4.     
    #13
    Banned
    Website's:
    WarezRelease.org ThatHosting.co
    ty m8, it works.

    obvios fix lol, any suggestions to recoord IP?

  5.     
    #14
    Respected Member
    Website's:
    DL4Everything.com Soft2050.in
    Quote Originally Posted by Chris2009 View Post
    ty m8, it works.

    obvios fix lol, any suggestions to recoord IP?
    Use $_SERVER['REMOTE_ADDR'] for getting user ip
    Add it in a table and search for the ip in the database! Add only if it doesn't existAlso, it would be better if you use RadioButtons

  6.     
    #15
    Member
    Quote Originally Posted by Gaurav View Post
    @MP3Drug: isset() returns boolean TRUE or FALSE so using a ternary operator won't do anything better..
    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

  7.     
    #16
    Member
    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

  8.     
    #17
    Banned
    Website's:
    WarezRelease.org ThatHosting.co
    ok 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>'
    ;
        } 
    doesnt seem to work, why? any help.

  9.     
    #18
    Respected Member
    Website's:
    DL4Everything.com Soft2050.in
    Quote Originally Posted by Chris2009 View Post
    ok 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>'
    ;
        } 
    doesnt seem to work, why? any help.
    I 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';
        } 

Page 2 of 2 FirstFirst 12

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Thumbs Ups and Thumbs Downs of 2011
    By Krack3r in forum General Discussion
    Replies: 8
    Last Post: 29th Dec 2011, 11:51 PM
  2. Thumbs up!
    By Maniac_ in forum Feedback and Suggestions
    Replies: 5
    Last Post: 20th Aug 2011, 01:43 AM
  3. Tunisian Needs Thumbs Up
    By Jumbo in forum General Discussion
    Replies: 9
    Last Post: 18th Jan 2011, 12:38 PM
  4. New Logo. Thumbs up or Down?
    By fileserve-links in forum Graphics Area
    Replies: 12
    Last Post: 29th Sep 2010, 08:45 PM
  5. Replies: 0
    Last Post: 21st Dec 2009, 03:38 AM

Tags for this Thread

BE SOCIAL